Actually I think the problem may be with forte. The batik security policy needs to know the root of the Batik 'distribution' so it can grant appropriate permissions.
The way it does this when running from class files (it does something different for jar files) is it get's the URL to one of the class files and looks for 'classes/org/apache/batik/...' in that path it then makes the parent of 'classes' the root of the distribution.
When running in Forte it appears that either this URL is strange or it doesn't include 'classes'.
Denis Bohm wrote:
I tried all the different settings and don't see any difference - still the same error.
I tried to run squiggle from Forte in the debugger, but I get:
java.lang.Error at org.apache.batik.util.ApplicationSecurityEnforcer.setDevBase(ApplicationSecu rityEnforcer.java:345) at org.apache.batik.util.ApplicationSecurityEnforcer.installSecurityManager(App licationSecurityEnforcer.java:276) at org.apache.batik.util.ApplicationSecurityEnforcer.enforceSecurity(Applicatio nSecurityEnforcer.java:203) at org.apache.batik.apps.svgbrowser.Main.setPreferences(Main.java:709) at org.apache.batik.apps.svgbrowser.Main.<init>(Main.java:347) at org.apache.batik.apps.svgbrowser.Main.main(Main.java:190) Exception in thread "main"
Do I need to specify some command line args to squiggle so that it can be run from the debugger?
----- Original Message ----- From: "Thomas DeWeese" <[EMAIL PROTECTED]>
To: "Batik Users" <[EMAIL PROTECTED]>
Sent: Wednesday, October 01, 2003 10:52 AM
Subject: Re: Scripting with Java Error
Hi,
Perhaps you have security settings set differently in Squiggle. Preferences->Browser Options->Security Settings
Denis Bohm wrote:
Hi,
Glad to hear that it works for someone. I'm running out of a fresh CVS checkout using 'ant squiggle'. Still not working for me... :^(
Denis
----- Original Message ----- From: "Christophe Jolif" <[EMAIL PROTECTED]>
To: "Batik Users" <[EMAIL PROTECTED]>
Sent: Wednesday, October 01, 2003 2:10 AM
Subject: Re: Scripting with Java Error
Denis,
This is working fine for me. Which version of Batik are you using? You
need at
least 1.5 (not a beta).
Denis Bohm wrote:
I'm trying to script using Java according to the SVG 1.1 specification:
http://www.w3.org/TR/SVG11/java.html
But when I try to load my demo.svg file into Squiggle I get:
"SVG Error: com.fireflydesign.svg.SVGHandler
java.lang.ClassNotFoundException: com.fireflydesign.svg.SVGHandler ..."
I checked the archive and it seems to contain the handler class.
Anyone
have any idea why the class can't be found?
Thanks, Denis
Here is my SVG (demo.svg):
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [ ]> <svg width="600" height="800" viewBox="0 0 600 800" xmlns:xlink="http://www.w3.org/1999/xlink"> <script type="application/java-archive" xlink:href="demo.jar"/> <text x="10" y="20" fill="black">Hello</text> </svg>
Here is my manifest:
Manifest-Version: 1.0 SVG-Handler-Class: com.fireflydesign.svg.SVGHandler
And my Java source:
package com.fireflydesign.svg;
import org.w3c.dom.events.Event; import org.w3c.dom.events.EventListener;
import org.w3c.dom.svg.EventListenerInitializer; import org.w3c.dom.svg.SVGDocument; import org.w3c.dom.svg.SVGSVGElement;
public class SVGHandler implements EventListenerInitializer {
public SVGHandler() { }
public void initializeEventListeners(SVGDocument document) { SVGSVGElement root = document.getRootElement(); EventListener listener = new EventListener() { public void handleEvent(Event event) { System.out.println("onload"); } }; root.addEventListener("onload", listener, false); }
}
------------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Christophe
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]