JRECOMPILER - Make Java Script!

How to use JRecompiler

JRecompiler 1.0 doesn't provide any Java main functions to execute. Instead it requires its com.jrecompiler.Scriptlets class be invoked in your own main functions to initiate a re-compilation, as shown in the following code:

public class MyApplet extends js.JsApplet
    public void onReady() {
        js.Js.alert("A test for JRecompiler!");

    public void main(String[] args) {
        // Re-compile this applet
        new com.jrecompiler.Scriptlets("dir_of_my_scripts").add(MyApplet.class).recompile();
        // Re-compile this applet again
        new com.jrecompiler.Scriptlets("dir_of_my_scripts").add(new MyApplet()).recompile();
        // Re-compile another applet in verbose
        new com.jrecompiler.Scriptlets("dir_of_my_scripts").add(MyApplet2.class).recompile(true);
        // Re-compile another applet
        new com.jrecompiler.Scriptlets("dir_of_my_scripts").add(new MyApplet3()).recompile();
To execute the main function above, you must have the following packages included in your class path: