How do you run javascript from a jar in SVG? I have 300KB of javascript that takes too long (60 sec) to load over SSL and does not cache so it must reload each time. I am using the Batik 1.6 canvas inside my custom Java Swing application.
I see that Rhino has a Javascript compiler that is included inside the js.jar distributed with Batik. This will compile JS into Java classes. I made class files using this command file: java -cp js.jar;batik-script.jar;batik-util.jar;batik-bridge.jar org.mozilla.javascript.tools.jsc.Main -extends org.apache.batik.script.rhino.RhinoInterpreter %1 I can then make the class files into a Jar and then put the jar into the build path for my java app. But I am unable to get the JS to run so far. I even tried the Packages command in my js. Perhaps this is not the correct solution. I also tried to zip the JS directly into a jar (no compile to class files) and then tried to reference the jar in the SVG with: <script xlink:href="myjs.jar" type="application/java-archive"/> This also is not working. Does anybody out there have a suggestion? Should I be looking at how to patch into the Batik source code? -- View this message in context: http://www.nabble.com/Run-JS-from-jar-in-SVG-tf2920713.html#a8163157 Sent from the Batik - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
