Commit db6c0fda authored by Lubomir Bulej's avatar Lubomir Bulej
Browse files

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 { ...@@ -53,9 +53,7 @@ public abstract class Runner {
private static String __getJavaCommand () { private static String __getJavaCommand () {
final String javaHome = System.getenv (_ENV_JAVA_HOME_); final String javaHome = System.getenv (_ENV_JAVA_HOME_);
if (javaHome != null) { if (javaHome != null) {
return new File ( return Strings.join (File.separator, javaHome, "jre", "bin", "java");
new File (new File (javaHome, "jre"), "bin"), "java"
).toString ();
} else { } else {
return "java"; 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