[jdom-interest] JDOM prob
- XërôKòól -
syphrix at hotmail.com
Sun Jul 29 09:15:44 PDT 2001
hello,
>
>i have a problem running JDOM apps. i've a error that states:
>java.lang.NoSuchMethodError.
>i have read the faq page at JDOM site and adjustments to my classpath but i
>still cannot run JDOM
apps.
>please help. thank you.
>
>the following files are in my java standard extension dir:
>servlet.jar, xalan.jar, xerces.jar(xerces.jar comes with JDOM
download)
>
>the following is my CLASSPATH setting:
>
d:\jdk\bin;d:\jdom\lib\xerces.jar;d:\jdom\build\jdom.jar;d:\xerces-1_2_3\xerces.jar;d:\xalan\bin\xalan.jar;
>
>the following is the code i'm trying to run:
>import java.io.*;
>import java.io.File;
>
>import org.jdom.*;
>import org.jdom.input.*;
>import org.jdom.output.*;
>
>public class AddCode
>{
> public AddCode(String filename)
> {
> DOMBuilder builder = new DOMBuilder();
> Document doc;
> Element root, imageElement;
>
> try
> {
> FileInputStream in = new FileInputStream(new
File("d:\\project\\svg\\"
>+filename));
> try
> {
> doc = builder.build(in);
> root = doc.getRootElement();
> imageElement = GetImageElement(root);
> String s = imageElement.toString();
> System.out.println(s);
>
> }
> catch(JDOMException e)
> {
> System.out.println(e);
> }
>
> in.close();
>
> }
> catch (IOException ioe)
> {
> ioe.printStackTrace();
> }
> }
>
> public Element GetImageElement(Element e)
> {
> Element child, grandChild;
>
> child = e.getChild("g");
> grandChild = child.getChild("image");
>
> return grandChild;
>
> }
>
>}
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
More information about the jdom-interest
mailing list