From 5aa5de0aa0ab2d15c6e872c263209b2f748a47be Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 1 Feb 2007 02:23:47 +0000 Subject: [PATCH] Regenerate the classes.jsa file so that our locally installed Java can launch with the same (emacs-like) fastness as a standard Java install. --- src/java/com/threerings/getdown/launcher/Getdown.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/java/com/threerings/getdown/launcher/Getdown.java b/src/java/com/threerings/getdown/launcher/Getdown.java index b0a8016..c4491c6 100644 --- a/src/java/com/threerings/getdown/launcher/Getdown.java +++ b/src/java/com/threerings/getdown/launcher/Getdown.java @@ -443,6 +443,15 @@ public abstract class Getdown extends Thread // we should do something like tell the user or something but fucking fuck } } + + // lastly regenerate the .jsa dump file that helps Java to start up faster + String vmpath = LaunchUtil.getJVMPath(_app.getLocalPath("")); + try { + Log.info("Regenerating classes.jsa for " + vmpath + "..."); + Runtime.getRuntime().exec(vmpath + " -Xshare:dump"); + } catch (Exception e) { + Log.warning("Failed to regenerate .jsa dum file [error=" + e + "]."); + } } /**