Hi all,
I am just starting with batik and try to run a very simple script within a SVG document. The script is just the function below,


function callJava() {
     var cx = Packages.org.mozilla.javascript.Context.enter();
     alert(cx);
}

but when i run this within the squiggle browser, i get the following error

TypeError: [JavaPackage org.mozilla.javascript.Context.enter] is not a function. (Inline <script> file:/Projects/svg/lines.svg:6; line 3)
at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java: 597)
at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java: 557)
at org.mozilla.javascript.NativeGlobal.typeError1(NativeGlobal.java:567)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1182)


(rest of the trace omitted)

the code execute ok within the standalone rhino shell, so i think this is probably a classpath setting problem.
i try runnning the browser in the batik installation directory by


java -jar batik-squiggle.jar

and also (as a user suggested in an earlier post),

java -cp batik-squiggle.jar:lib/js.jar org.apache.batik.apps.svgbrowser.Main

but neither works, can anyone help?

thanks very much

Jeff


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to