On Fri, 23 Mar 2001, [EMAIL PROTECTED] wrote:

> 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

The -jar option to java is for running jar files which specify a main
class in their manifest.  What you need to do is:

c:\jdk1.3\bin\java -cp c:\jdk1.3\xerces-1_3_0\xerces.jar;x:\classes Dommy

(where x:\classes should be replaced with the directory where your class
files live)

Ian

-- 
Ian Roberts, Software Engineer        DecisionSoft Ltd.
Telephone: +44-1865-203192            http://www.decisionsoft.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to