Subj : Rhino - EcmaError not showing line-number (only within small-footprint applet) To : netscape.public.mozilla.jseng From : ariel_ml@netvision.net.il (Ariel Malka) Date : Mon Aug 25 2003 04:00 pm I made a minimal "execution-notepad" applet that would run multi-line scripts (see code below). Running within eclipse (Applet Viewer + "java.security.AllPermission" + full js.jar): when an error is encountered, EcmaError is showing a line number as intended. Now, when running within explorer (Sun JRE + small-footprint js.jar): for the same error as before, EcmaError is not showing a line number! Any clues? Thanks! import java.applet.*; import java.awt.*; import java.awt.event.*; import org.mozilla.javascript.*; public class Shell3 extends Applet { private TextArea codeBox; private Button buttonRun; private Context cx; private Scriptable scope; public void init() { setLayout(new BorderLayout()); codeBox = new TextArea(); buttonRun = new Button("Run"); buttonRun.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { evaluate(codeBox.getText()); } }); add(codeBox, BorderLayout.CENTER); add(buttonRun, BorderLayout.SOUTH); } public void evaluate(String command) { try { cx = Context.enter(); scope = cx.initStandardObjects(null); Object result = cx.evaluateString(scope, command, "", 1, null); System.out.println(Context.toString(result)); } catch(JavaScriptException jse) {} catch(EcmaError ee) { System.out.println(ee); System.out.println("AT LINE: " + ee.getLineNumber()); } finally { Context.exit(); System.gc(); } } } .