xml-general mailing list archives

Brett and others,
>Hi Bill. Let's see if we can help you out. Here's what we need:
>
>1) The exact, copied/pasted error, such as:
>
>SAXParserDemo.java:37: Class org.xml.sax.Attributes not found in import.
>import org.xml.sax.Attributes;
SAXParserDemo.java:2: Class org.xml.sax.XMLReader not found in import
import org.xml.sax.XMLReader;
^
SAXParserDemo.java:4: Class org.apache.xerces.parser.SAXParser not found
in import.
import org.apache.xerces.parser.SAXParser;
>...
>...
>
>2) The exact result of 'echo $CLASSPATH'
/home/bhalchin/FTP/xerces-1_1_3/xerces.jar:/home/bhalchin/FTP/xerces-1_1_3/xercesSamples.jar:/home/bhalchin/FTP/xasd/p7bin
>
>3) For each path in $CLASSPATH, the result of 'ls <path>'
>
>So if 'echo $CLASSPATH' results in:
>
>/foo/bar/xerces.jar:/foo/bar
>
>Then you would do:
>
>ls /foo/bar/xerces.jar
>
>ls /foo/bar
ls /home/bhalchin/FTP/xerces-1_1_3/xerces.jar
/home/bhalchin/FTP/xerces-1_1_3/xerces.jar
>
>This will ensure that your $CLASSPATH has actual entries that correspond
>to exact files and directories, and that those exist. Once we get that,
>plus the exact class missing, we can help you out. What your classpath
>/should/ look like:
>
>1) if xerces.jar is in /projects/lib/xerces.jar
>2) if SAXBuilderDemo is in /projects/javaxml/SAXBuilderDemo.java
>
>'echo $CLASSPATH' should give you:
>
>/projects/lib/xerces.jar:/projects/javaxml
>
>Remember that in addition to the xerces.jar, you need to have the
>directory with the compiled Java class you are working on. So if you got
>something like:
>
>SAXParserDemo.java:37: Class org.xml.sax.Attributes not found in import.
>import org.xml.sax.Attributes;
>
>This would indicate that xerces.jar is missing from your classpath
>(anything org.xml.sax or org.apache.xerces or org.w3c.dom)
>
>Now if you get things compiled, then you could get errors from not
>having the classes in your 'working directory' in the classpath, and you
>would get an error like:
>
>Exception in thread "main" java.lang.NoClassDefFoundError: SAXParserDemo
>
>Let us know more about what is happening, and we'll get you hooked up
>;-)
>
>
>Thanks,
>Brett
>
Thnaks, Bill
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.