All I'm trying to do is try out Xerces. When I run my program it complains:
Exception in thread "main" java.lang.NoClassDefFoundError: org/xml/sax/SAXException
 
I just don't get what I'm doing wrong.
 
This is how I build:
c:\jdk1.3\bin\javac  -classpath c:\jdk1.3\xerces-1_3_0\xerces.jar  Dommy.java
 
And this is how I run:
set CLASSPATH=
c:\jdk1.3\bin\java Dommy -jar c:\jdk1.3\xerces-1_3_0\xerces.jar
 
Anyone have any ideas?
Thanks.

 
import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
import java.io.IOException;
 
public class Dommy
{
 public Dommy()
 {
  String xmlFile = "file:map.xml";
 
  DOMParser parser = new DOMParser();
 
  try {
      parser.parse(xmlFile);
  
  } catch (SAXException se) {
      se.printStackTrace();
  } catch (IOException ioe) {
      ioe.printStackTrace();
  }
 
  Document document = parser.getDocument();
 }
 
 public static void main(String args[])
 {
  Dommy t = new Dommy();
 }
}

 

Reply via email to