Package org.dru.clay.rhino

Source Code of org.dru.clay.rhino.Main

package org.dru.clay.rhino;

import org.mozilla.javascript.Context;
import org.mozilla.javascript.ScriptableObject;

import java.io.File;

/**
* Main
* User: joakimd
* Date: 2013-07-17
* Time: 11:20
*/
public final class Main {
    public static void main(String[] args) throws Exception {
        final Context context = Context.enter();
        try {
            final ScriptableObject global = context.initStandardObjects();
            final Module module = new Module("global", new File(System.getProperty("user.dir")));
            module.init(context, global);
        } finally {
            Context.exit();
        }
    }
}
TOP

Related Classes of org.dru.clay.rhino.Main

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.