Merge pull request #214 from Simpli-city/master

Fix bug on mac while regenerating classes.jsa when path to java contains spaces
This commit is contained in:
Michael Bayne
2019-05-09 10:38:52 -07:00
committed by GitHub
@@ -525,9 +525,10 @@ public abstract class Getdown extends Thread
// lastly regenerate the .jsa dump file that helps Java to start up faster // lastly regenerate the .jsa dump file that helps Java to start up faster
String vmpath = LaunchUtil.getJVMBinaryPath(javaLocalDir, false); String vmpath = LaunchUtil.getJVMBinaryPath(javaLocalDir, false);
String[] command = new String[]{vmpath, "-Xshare:dump"};
try { try {
log.info("Regenerating classes.jsa for " + vmpath + "..."); log.info("Regenerating classes.jsa for " + vmpath + "...");
Runtime.getRuntime().exec(vmpath + " -Xshare:dump"); Runtime.getRuntime().exec(command);
} catch (Exception e) { } catch (Exception e) {
log.warning("Failed to regenerate .jsa dump file", "error", e); log.warning("Failed to regenerate .jsa dump file", "error", e);
} }