We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 076b2d8 commit 0e638b5Copy full SHA for 0e638b5
jay/src/jay/JRE.java
@@ -19,8 +19,8 @@
19
public class JRE {
20
21
public static String jre() {
22
- RuntimeMXBean mxbean = ManagementFactory.getPlatformMXBean(RuntimeMXBean.class);
23
- String java = mxbean.getBootClassPath().split(quote(separator)+"lib",2)[0]+separator+"bin"+separator+"java";
+ String javaHome = System.getProperty("java.home");
+ String java = javaHome + separator + "bin" + separator + "java";
24
return new File(java).exists() ? java : java + "w.exe";
25
}
26
0 commit comments