Hi,

I am trying to get an SVG image to display in an applet. However, I have the following error and don't know what is causing it.

Exception occurred during event dispatching:java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.batik.min_repaint_time read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at org.apache.batik.bridge.UpdateManager.<clinit>(Unknown Source)
at org.apache.batik.swing.svg.JSVGComponent.setSVGDocument(Unkno wn Source)
at org.apache.batik.swing.svg.JSVGComponent$SVGListener.documentL oadingCompleted(Unknown Source)
at org.apache.batik.swing.svg.SVGDocumentLoader$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

The applet looks like it nearly loads up (the applet turns white). On the status bar at the bottom of the IExplorer window it says the following:

Opening http://localhost:8081/org/apache/batik/dom/svg/resources/dtdids_en_G B.properties

and it just hangs there. i looked in the appropriate .jar file and I don't have this properties file in there. Is this causing the problem? I'm sure that fixing this won't make my applet work though. Below is my code for my applet


import org.apache.batik.swing.*;
import org.apache.batik.swing.JSVGCanvas;
import org.apache.batik.svggen.*;
import org.apache.batik.dom.svg.SVGDOMImplementation;
import org.w3c.dom.*;
import org.w3c.dom.svg.*;
import javax.swing.*;
import java.awt.*;
import java.awt.geom.*;

public class TestSVGInApplet extends JApplet
{
public void init()
{
DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
SVGDocument doc = (SVGDocument)impl.createDocument(svgNS, "svg", null);


Container c = getContentPane();


//Now, display the document
JSVGCanvas canvas = new JSVGCanvas();
canvas.setURI("http://localhost:8081/SVGImages/Intro.svg");

c.add(canvas);
}
}

and my html file with the applet embedded:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>
<HEAD>
<TITLE>Yahtzee eXtreme!</TITLE>
<STYLE type="text/css">
A {font-family:arial; font-size:10pt; color:red}
A:hover {color:yellow}
</STYLE>
</HEAD>
<BODY BGCOLOR="black" text="white">
<APPLET CODE="TestSVGInApplet.class" HEIGHT="200" WIDTH="200" ARCHIVE="batik- swing.jar, batik-svg-dom.jar, batik-dom.jar, batik-ext.jar, batik-util.jar, batik-css.jar, batik-xml.jar, batik-gvt.jar, batik-bridge.jar, batik-gui-util.jar, crimson-parser.jar"></APPLET>

</BODY>
</HTML>






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



Reply via email to