Permalink
Browse files

[293398] HTTP Preview Server does not start - "Could not find JRE

executable"
  • Loading branch information...
1 parent ff107ca commit 0c30b68671dd57bed7356e27969b0e1fb082b169 @elsony elsony committed Oct 29, 2012
@@ -168,12 +168,12 @@ protected static String renderCommandLine(String[] commandLine) {
}
protected static File getJavaExecutable() {
- // do not detect on the Mac OS
+ // set the 'java.home' system property on the Mac OS
if (Platform.getOS().equals(Constants.OS_MACOSX))
- return null;
+ System.setProperty("java.home", "/Library/Java/Home");
// retrieve the 'java.home' system property. If that directory doesn't exist, return null
- File javaHome;
+ File javaHome;
try {
javaHome = new File(System.getProperty("java.home")).getCanonicalFile();
} catch (IOException e) {

0 comments on commit 0c30b68

Please sign in to comment.