wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes package problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "package problem" Watch "package problem" New topic
Author

package problem

Je Th
Greenhorn

Joined: Dec 03, 2003
Posts: 12
Im lost with package problem. Why do I get a comipler error on DOMParser, I found this on the Java Ranach wkiki FAQ - XML. Do I need something more then just this code?
David Peterson
author
Ranch Hand

Joined: Oct 14, 2001
Posts: 154
Make sure you are including all the relevant JAR files in your classpath when you run the code.
If you're still having problems, post a copy of the compiler's error messages. That will help us to work out what's going on.
Regards,
David Peterson
Je Th
Greenhorn

Joined: Dec 03, 2003
Posts: 12
Thats the "tricky" part "package org.apache.xerces.parsers does not exist" it the compiler error.
David Peterson
author
Ranch Hand

Joined: Oct 14, 2001
Posts: 154
Download the latest Xerces JARs from http://gump.covalent.net/jars/latest/xml-xerces2/ and add them to your classpath.
David Peterson
Sebastian Green
Ranch Hand

Joined: Jan 30, 2004
Posts: 136
I cant mange to add the jars to my classpath. How do i do it? Create a enviroment variable called "CLASSPATH" and value "C:\myJarFiles\xercesImpl.jar;C:\myJarFiles\xmlParserAPIs.jar;" or is it more to it?


/ Sebastian<br />No blog, No homepage, No life?
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Check out HowToSetTheClasspath in the Java Ranch FAQ.


Java API Documentation
The Java Tutorial
Sebastian Green
Ranch Hand

Joined: Jan 30, 2004
Posts: 136
I mange to install the jars to my classpath but now Im getting this error:
Exception in thread "main" java.lang.NoClassDefFoundError: SchemeValidationExample
Any one got a clue?
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Exactly what does your CLASSPATH setting look like?
Did you forget to include a . in your CLASSPATH?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Je Th
Greenhorn

Joined: Dec 03, 2003
Posts: 12
I dont got any classpath i just copied the jar-files to the jre\lib\ext-folder. So I can compile it. Now its working, but not my CLASSPATH.. Its strange. If I remove the jar-files from the ext-folder, then it wont work. This is how my CLASSPATH looks like ".;C:\java\xerces-2_6_0\xercesImpl.jar;C:\java\xerces-2_6_0\xmlParserAPIs.jar", and Im using WinXP.
[ February 16, 2004: Message edited by: Je Th ]
 
Don't get me started about those stupid light bulbs.
 
subject: package problem
 
Similar Threads
Feature not recognized: - schema validation
Why it is happening like this.........
DOM Parser
Error while validating XML
XML schema validation problem