Search code examples
google-closuregoogle-closure-compiler

Use Google Closure Compiler as a library instead of a script


Is it possible for me to write my own Java Main Class that calls methods in compiler.jar.

I would like to make multiple calls to the compiler and do not want to write code to use Runtime.exec and also do not want to have to wait for Java to load up before every call.


Solution

  • Yes, this is fully supported.

    Overview: http://blog.bolinfest.com/2009/11/calling-closure-compiler-from-java.html
    Reference: http://closure-compiler.googlecode.com/svn/trunk/javadoc/index.html