Subj : RE: Use org.mozilla.javascript.tools.debugger in application which is embedding Rhino? To : netscape.public.mozilla.jseng From : Merten Schumann Date : Wed May 26 2004 06:02 pm > Ant build script for Rhino downloads Java sources for the > classes from > Sun examples web site and if you need to recompile Rhino > debugger then > you have to run ant once or download and unpack the sources yourself. I see, got the sources, thanx. Igor, what do you think, could another method additionally to main() make it's way to official Rhino? I added an mainEmbedded() method which could be helpful, if you use Rhino embedded. But when I look at the current tip it seems the Debugger is about to be changed anyway ... Maybe I should get the latest tip. Anyway, here are the changes to main() (code from Rhino 1.5R5) // Merten for embedded usage public static void mainEmbedded(final String title, final boolean breakOnExceptions, final boolean breakOnEnter, final boolean breakOnReturn) { try { mainThread=Thread.currentThread(); final Main sdb=new Main((title==null) ? "Rhino JavaScript Debugger (embedded usage)" : title); swingInvoke(new Runnable() { public void run() { sdb.pack(); sdb.setSize(600, 460); sdb.setVisible(true); } }); sdb.setExitAction(new Runnable() { public void run() { System.exit(0); } }); // Merten don't do that for embedded usage //System.setIn(sdb.getIn()); //System.setOut(sdb.getOut()); //System.setErr(sdb.getErr()); Context.addContextListener(sdb); sdb.setScopeProvider(new ScopeProvider() { public Scriptable getScope() { return org.mozilla.javascript.tools.shell.Main.getScope(); } }); // Merten it's good for embedded usage to stop at first script sdb.setBreakOnExceptions(breakOnExceptions); sdb.setBreakOnEnter(breakOnEnter); sdb.setBreakOnReturn(breakOnReturn); sdb.menubar.breakOnExceptions.setSelected(breakOnExceptions); sdb.menubar.breakOnEnter.setSelected(breakOnEnter); sdb.menubar.breakOnReturn.setSelected(breakOnReturn); // Merten not needed for embedded usage //org.mozilla.javascript.tools.shell.Main.exec(args); } catch(Exception exc) { exc.printStackTrace(); } } cu Merten .