Subj : Re: Rhino - EcmaError not showing line-number (only within small-footprint To : Ariel Malka From : Igor Bukanov Date : Tue Aug 26 2003 10:22 am Ariel Malka wrote: > 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! Try to add "cx.setOptimizationLevel(-1)" in you code after cx = Context.enter(); It will force pure interpreter mode in Rhino which does not generate any JVM classes for your scripts. In the interpreter mode Rhino does not need to parse output of Throwable.printStackTrace() to get line number information. Regards, Igor .