Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14439

Add environment variable to launch fitnesse with specific java version

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • fitnesse-plugin
    • None

      In class FitnesseExecutor.java,

      it could be nice to add the possibility to specify a FIT_JAVA_HOME to start fitnesse with a specific java version.

      It could look like something like this :

      public ArrayList<String> getJavaCmd(FilePath workingDirectory, EnvVars envVars) {
      String java = "java";
      if(envVars.containsKey("FIT_JAVA_HOME"))
      java = new File(new File(envVars.get("FIT_JAVA_HOME"), "bin"), java).getAbsolutePath();
      else if (envVars.containsKey("JAVA_HOME"))
      java = new File(new File(envVars.get("JAVA_HOME"), "bin"), java).getAbsolutePath();

      Very useful if you want to test a project build with maven and java 5

          [JENKINS-14439] Add environment variable to launch fitnesse with specific java version

          Jordan Grant added a comment -

          I have implemented a fix for this issue. I've added a field in the project fitnesse settings that will allow you to specify your JAVA_HOME for Fitnesse. If left blank, the default behavior is used (i.e. reference JAVA_HOME\bin\java.exe environment variable specifically and fall back on the command 'java' if it does not exist).

          You can find the fork of this plugin at: https://github.com/Honesty-Box/fitnesse-plugin

          The compiled fitnesse.hpi is also available if you don't want to build from source. Please be aware that the master branch that we forked had 3 failing unit tests for NPE in the class HudsonDependentTest.

          Jordan Grant added a comment - I have implemented a fix for this issue. I've added a field in the project fitnesse settings that will allow you to specify your JAVA_HOME for Fitnesse. If left blank, the default behavior is used (i.e. reference JAVA_HOME\bin\java.exe environment variable specifically and fall back on the command 'java' if it does not exist). You can find the fork of this plugin at: https://github.com/Honesty-Box/fitnesse-plugin The compiled fitnesse.hpi is also available if you don't want to build from source. Please be aware that the master branch that we forked had 3 failing unit tests for NPE in the class HudsonDependentTest.

          fixed in version 1.9 (2014-03-26)

          Antoine Aumjaud added a comment - fixed in version 1.9 (2014-03-26)

            antoine_aumjaud Antoine Aumjaud
            xblond Xavier Blond
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: