Store JVM in JAR from command line

I am running the closure pattern compiler on a soy file with a clock - it just runs

java -jar SoyToJsSrcCompiler.jar  --outputPathFormat simple.js


every time the file changes.

The problem is that it takes a long time for each banner to load each one. Is there an easy way (simple = command line tool) that will keep the JVM starting up to speed up each startup?


source to share

2 answers

Checkout Nailgun



You can create a simple class that calls the main SoyToJsSrcCompiler method passing in arguments taken from

Something like this (not tested) (enter "quit" to quit the application):

  public static void main(String args[]) throws Exception
    BufferedReader br = new BufferedReader(new InputStreamReader(;
    while (true)
      System.out.println("Enter command (eg: --outputPathFormat simple.js ");
      String line = br.readLine();
      if (line.equals("quit"))
        break;" +"));


And execute your launchers with arguments:

java -cp MyLauncher.jar:SoyToJsSrcCompiler.jar launcher.MyLauncher




All Articles