xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Bohm" <de...@fireflydesign.com>
Subject Scripting with Java Error
Date Wed, 01 Oct 2003 04:25:57 GMT
I'm trying to script using Java according to the SVG 1.1 specification:


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?


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"
    <script type="application/java-archive" xlink:href="demo.jar"/>
    <text x="10" y="20" fill="black">Hello</text>

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) {
        root.addEventListener("onload", listener, false);


View raw message