Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Execution fails if running fitnesse.jar from another directory #862
Problem happening with version 20150814 and 20151230 on Windows.
When running fitnesse from a directory different from where the jar is placed, it cannot run the slim server.
Here you have an example accessing to the fitnesse-standalone.jar in current path:
and here accessing from the parent path:
As you can appreciate, both examples are equal, but the second one doesn't work. By executing them from the web interface, the result is a message showing:
I initially thought it was related to #418 but it is still happening with version 20151230.
Maybe I'm doing something wrong?
FitNesse launches the Slim server in a second process. For that it builds a class path for the to be executed (Java) process. It does a best guess for the fitnesse.jar file name, and if none found, defaults to fitnesse.jar.
Your problem can be resolved in a couple of ways:
I'm not sure if FitNesse can be smarter in determining the fitnesse jar file. It should find the jar file containing the Slim server and add that to the class path automatically.
To define the fitnesse location explicitly is a bad idea, because it requires to have the same installation in all the machines that are going to run it. But this opens a new option: what about adding a new command line argument to set the path where fitnesse is located?
Anyway, I will study to install fitnesse in a known path in order to use the
Explicitly defining the fitnesse.jar is not charming. I agree. Maybe the algorithm to determine the fitnesse.jar location can be made smarter. I have some idea: look up the test runner class name as a resource and obtain the jar file location from there.