• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

packages

 
Manoj Zachariah
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this line gives me an error saying that the package does not exist.
how do i get the package and install it
import com.ibm.xml.parsers.*;
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just did a quick search with Google and found a link to download it at DeveloperLife.com. 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 xml4j_2_0_9.zip 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic