[jdom-interest] a question

Busiello, Steve Steve.Busiello at gs.com
Tue Jun 5 14:12:50 PDT 2001


Thanks to all who lent a hand. I had to add xerces.jar to my classpath ( for
those with the problem in the future )
-Steven

-----Original Message-----
From: Ian Lea [mailto:ian.lea at blackwell.co.uk]
Sent: Tuesday, June 05, 2001 5:08 PM
To: Busiello, Steve
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] a question


org.xml.sax.InputSource is a parser class, not a JDOM class.
You need to make sure that crimson.jar or xerces.jar (or
your preferred parser) is in the classpath.  Safest to use
one that comes with JDOM.  May also need to make sure that
you haven't got old copies of xerces.jar or other parser jars
floating around in the classpath or extensions directory.


--
Ian.
ian.lea at blackwell.co.uk


"Busiello, Steve" wrote:
> 
> I tried to compile a simple exercise given in one of the documents I
pulled
> off of jdom.org
> 
> import java.io.*;
> import org.jdom.*;
> import org.jdom.input.*;
> import org.jdom.output.*;
> 
> public class PrintXML {
>         public static void main(String[] args) {
> 
>               String filename = args[0];
>               try {
> 
>                   SAXBuilder builder = new SAXBuilder();
>                   Document doc = builder.build(new File(filename));
>                   XMLOutputter fmt = new XMLOutputter();
>                   fmt.output(doc, System.out);
>               }   catch ( Exception e ) {
>                   System.out.println("Error: "+e);
>               }
>         }
> }
> 
> When I try to compile I get this error. I looked through the news groups
and
> found one thread that I thought was going to be useful, but it was in
> Russian.
> when I do a fresh build A directory org\xml\sax is not generated
> 
> Z:\JDOM-B6\STEVEN>javac PrintXML.java
> PrintXML.java:17: cannot access org.xml.sax.InputSource
> file org\xml\sax\InputSource.class not found
>                         Document doc = builder.build(new File(filename));
>                                               ^
> 1 error
> 
> Could some one lend a hand
> 
> thanx
> 
> -Steven



More information about the jdom-interest mailing list