-
Improvement
-
Resolution: Fixed
-
Major
-
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
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.