I've been able to use batik to create and write svg's though I'm having trouble
reading an svg file into the internal batik format. I've simplified the error that I
keep getting using the following program, following the example on the batik webpage
to create a document from an svg...
-------------------------------------------------------------------------
public static void main(String args[]){
try {
String parser = XMLResourceDescriptor.getXMLParserClassName();
System.out.println(parser);
SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
String uri = "file://test.svg";
Document doc = f.createDocument(uri);
} catch (IOException ex) {
System.out.println("exception caught?");
// ...
}
}
-----------------------------------------------------------------------
When running this program I get the following runtime error:
----------------------------------------------------------------------
[EMAIL PROTECTED]:~/webDesign/software/svgtools$ LANG="en_US" java svgTool
Exception in thread "main" java.lang.ExceptionInInitializerError
at svgTool.main(svgTest.java:14)
Caused by: java.util.MissingResourceException: Can't find bundle for base name
org.apache.batik.util.resources.XMLResourceDescriptor, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:538)
at
org.apache.batik.util.XMLResourceDescriptor.<clinit>(XMLResourceDescriptor.java:57)
... 1 more
---------------------------------------------------------------------
I've tried this example under sun virtual machine 1.3 and 1.4.1, on a RedHat system,
on a Debian system, and also with several different locales.
As I'm still fairly new to the java language itself I'm wondering if I'm not doing
something correct that would be obvious to someone with more experience using either
java or the sax parser which the XMLResourceDescriptor seems to use.
If anyone has advice on what I can do to avoid the runtime error it would be much
appreciated... or, what exactly is going on when the program goes to get a "resource
bundel." I'm assuming that some of this question might be more approriate for some of
more general java or xml forums, though I'm tring to learn enough of what I need to,
to get back to considering using batik...
Michael
p.s. the link on the website to batik as an artform seemed to be broken last night
__________________________________________________________________
Try AOL and get 1045 hours FREE for 45 days!
http://free.aol.com/tryaolfree/index.adp?375380
Get AOL Instant Messenger 5.1 for FREE! Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promos=380455
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]