[jdom-interest] jdom run

ShantAdam adams at multispex.com
Mon Feb 18 05:42:43 PST 2002


So now I have the jdom.jar in my classpath as follows:
CLASSPATH=
".;
C:\Program Files\jdk1.3.1_01\lib\tools.jar;
C:\Program Files\jakarta-ant\bootstrap\lib\ant.jar;
C:\Program Files\xml_api\jdom\build\jdom.jar;
C:\Program Files\xml_api\jdom\lib\xerces.jar;
C:\Program Files\xml_api\jdom\lib\crimson.jar;
C:\Program Files\xml_api\jdom\lib\jaxp.jar;
C:\Program Files\xml_api\jdom\lib\xalan.jar;
C:\Program Files\xml_api\sax2\sax2-r2pre3.jar;"

I have these files copied in the following directory:
C:\Program Files\JavaSoft\JRE\1.3.1\lib\ext
crimson.jar
jaxp.jar
jdom.jar
sax2-r2pre3.jar
xalan.jar
xerces.jar

Same files are copied in this directory:
C:\Program Files\jdk1.3.1_01\jre\lib\ext
crimson.jar
jaxp.jar
jdom.jar
sax2-r2pre3.jar
xalan.jar
xerces.jar

But I'm getting this error message:
Exception in thread "main" java.lang.NoClassDefFoundError:
SAXTest("NamHyData")

when I'm runing my SAXTest.class with the following code:
import java.io.File;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;

public class SAXTest{
 public static void main(String[] args){
  if (args.length != 1){
   System.out.println("Usage: SAXTest(filename to parse)");
   return;
  }

  try{
   //Request document building without validation
   SAXBuilder builder = new SAXBuilder(false);
   Document doc = builder.build(new File(args[0]));
   System.out.println("Document successfully read");
  }
  catch(JDOMException e){
   e.printStackTrace();
  }
 }
}

What can you determine as wrong move or programming?


Multispex Designs
Rep.: Shant Adam
Tel.: (514) 827-4840
adams at multispex.com
http://www.multispex.com
---
Visual technology service provider.
Fournisseur de service de technologie visuel.
---
Copyright 1998-2002©
Multispex Designs®
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20020218/d9e95935/attachment.htm


More information about the jdom-interest mailing list