File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes packages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "packages" Watch "packages" New topic


Manoj Zachariah
Ranch Hand

Joined: Dec 08, 2003
Posts: 65
this line gives me an error saying that the package does not exist.
how do i get the package and install it
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

You need to understand how the classpath works and how to set it.
As for where that package came from, The Java package naming convention is the inverse of the domain name of the entity that produced it. Your package, therefore, came from IBM. If the example you are looking at is from Websphere so you could start by looking under the webserver directory for some jar file with "xml" in it's filename. You can examine the contents of jar files with "jar -tf <filename>" or Winzip.

[How To Ask Questions On JavaRanch]
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
I just did a quick search with Google and found a link to download it at I believe this download includes the xml4j.jar file that you were searching for in a previous thread.
You'll want the xml4j.jar file that is inside of the downloaded file. To compile a class that makes use of a class in the JAR file, you'll have to let the compiler know to use the JAR file by specifying its location in the CLASSPATH setting at compiler time. You'll likely have to do a similar thing at runtime.
Take a look at our wiki page on HowToSetTheClasspath for the steps involved on doing just such a thing.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: packages
It's not a secret anymore!