This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 8836

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.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[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
Similar Threads
WA #1.....word association
Help me
Creating a Web Service in Eclipse: NoClassDefFoundError
jrun 4 + IIS + jdk 1.4 --> not able to find package