my dog learned polymorphism
The moose likes Product and Other Certifications and the fly likes Are these correct steps to installing & running Xerces-2_2_1? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Product and Other Certifications
Bookmark "Are these correct steps to installing & running Xerces-2_2_1?" Watch "Are these correct steps to installing & running Xerces-2_2_1?" New topic

Are these correct steps to installing & running Xerces-2_2_1?

Kevin Thompson
Ranch Hand

Joined: May 04, 2001
Posts: 237
Does anybody here understand Xerces? I am working on my XML Certification and it bothers me that I can't get Xerces to run. The run instructions on are non-existant.

Step 01 - download the Xerces files to my c drive:
Step 02 - unpack the zip files:
c:\>jar xf
c:\>jar xf
The above two commands will place the contents into: c:\xerces-2_2_1
c:\>jar xf
The above command will place the contents into: c:\tools
Step 03 - Set the path:
c:\>set path=c:\jdk1.4.0\bin
Step 04 - Set the CLASSPATH:
c:\>set CLASSPATH=c:\xerces-2_2_1\xercesSamples.jar;c:\xerces-2_2_1\xercesImpl.jar;c:\xerces-2_2_1\xmlParserAPIs.jar
Step 05 - Create an XML File named "intro.xml" and place inside xerces-2_2_1 folder:
<?xml version = "1.0"?>
<message>Figure this stuff out!!!</message>
Step 06 - Run the sample sax program named "Counter":
c:\>xerces-2_2_1\java sax.Counter intro.xml
I get these results:
intro.xml: 118 ms (2 elems, 0 attrs, 0 spaces, 31 chars)
Things are fine so far - but how do I compile my own programs?
This text is from the "Installation" section of the Xerces Apache web site ==> "In order to compile the source code using Ant or to build the release distributions yourself, you must have the contents of on your classpath; i.e., you will need access to a version of ant.....For ease of use, we recommend extracting in your xerces root directory; the and build.bat scripts are written for this case."
Background Story: There are no "readme.txt" files anywhere regarding the "tools" file folder, OR the "" file or the "build.bat" file.
My questions/comments:
1. In plain English, is this what they mean => If I want to make a change to the sax.Counter program, I need to put the entire tools folder in my classpath and run one of the provided batch files (either or build.bat).?
2. I guess the "build.bat" file is for windows? NOTE: the build.bat file they provided references two separate jar files that do not appear to exist, so maybe they have errors in their batch files? (I am talking about the c:\tools\bin\xjavac.jar file and also the c:\jdk1.4.0\lib\ file.)
3. I guess the "" file is for UNIX?
These are my steps to making my own source code changes (I tried to make out what they are doing in the build.bat file and follow it
Step 01 - set the Path:
c:\xerces-2_2_1>set path=jdk1.4.0\bin
Step 02 - set the JAVA_HOME per their batch file instructions:
c:\xerces-2_2_1> set JAVA_HOME=c:\jdk1.4.0\bin\java.exe;c:\jdk1.4.0\lib\tools.jar
Step 03 - set the CLASSPATH (add the tools jars):
c:\xerces-2_2_1> set CLASSPATH=
Step 04: I save the sax.Counter program as sax.Counter1 and within the program change all occurances of "Counter" to "Counter1" and try to recompile as follows:
I get these results:
error: cannot read :
Step 05: Even the provided sax.Counter can not be recompiled:
I get these results:
error: cannot read :
Their batch file instructions refer to two file that do not exit:
c:\jdk1.4.0\lib\ <- this zip file does not exist as part of JDK1.4.0
c:\tools\bin\xjavac.jar <- this jar file does not exist in Xerces-2_2_1
Interpreting batch files is not one of my strong points. Does anyone have suggestions?
I agree. Here's the link:
subject: Are these correct steps to installing & running Xerces-2_2_1?
It's not a secret anymore!