Commit db6c0fda authored by Lubomir Bulej's avatar Lubomir Bulej

Runner.java: Join strings instead of constructing File instances just to...

Runner.java: Join strings instead of constructing File instances just to convert them to String in the end.
parent d7100653
......@@ -53,9 +53,7 @@ public abstract class Runner {
private static String __getJavaCommand () {
final String javaHome = System.getenv (_ENV_JAVA_HOME_);
if (javaHome != null) {
return new File (
new File (new File (javaHome, "jre"), "bin"), "java"
).toString ();
return Strings.join (File.separator, javaHome, "jre", "bin", "java");
} else {
return "java";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment