Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Xalan-Java installation problem

Status
Not open for further replies.

AndrewChandler

Programmer
Jul 2, 2003
6
GB
I have downloaded xalan-j_2_5_1-bin.zip from The documentation leads me to believe that this will contain all I need to run the samples - I am particularly interested in ApplyXPath, as this seems to cover all I need (load and parse an XML file, select nodes and extract values). When I try to compile I get errors of the type:

javac ApplyXPath.java
ApplyXPath.java:62: cannot resolve symbol
symbol : class DocumentBuilderFactory
location: package parsers
import javax.xml.parsers.DocumentBuilderFactory;
^
xalan.jar, xml-apis.jar and xercesImpl.jar are in the path in CLASSPATH.

Any ideas on what I have missed?
 
I just shifted the files as Pete suggested and tried

javac ApplyXPath.java

and

javac -classpath .;C:\jdk1.3.1_08\lib\ext ApplyXPath.java

with

CLASSPATH=C:\jdk1.3.1_08

Same result, I'm afraid
 
My bad, your compiling DOH!

I don’t think you can use any specific folder and have the compiler find it. Nor does the compiler use the CLASSPATH environment variable. You need to set the classpath commandline parameter just as you posted only you have to specify the jar file itself
Code:
javac -classpath c:\somefolder\xalan.jar ApplyXPath.java




-pete
 
OK, I extracted the contents of the jar files into folders under C:\jdk1.3.1_08\lib\ext and it compiled. To run I also had to unpack xercesImpl.jar to resolve a run time error. Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top