#97 ✓resolved
Thatcher

add documentation for embedding in java app

Reported by Thatcher | March 2nd, 2010 @ 07:32 AM | in 1.2.x

http://groups.google.com/group/envjs/browse_thread/thread/4f84d9b68...


import org.mozilla.javascript.Context;
    import org.mozilla.javascript.ContextFactory;
    import org.mozilla.javascript.tools.shell.Global;
    import org.mozilla.javascript.tools.shell.Main;
    ...
                    Context cx = ContextFactory.getGlobal().enterContext();
                    cx.setOptimizationLevel(-1);
                    cx.setLanguageVersion(Context.VERSION_1_5);
                    Global global = Main.getGlobal();
                    global.init(cx);
                    Main.processSource(cx, <path to your JS file>);

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

a javascript browser environment

People watching this ticket

Tags

Pages