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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Classpath problems

Status
Not open for further replies.

toolkit

Programmer
Aug 5, 2001
771
GB
Hi there.
I am currently reading my way through the excellent 'Java and XML' book by Brett McLaughlin. This book takes you through SAX, DOM, and on to other XML related APIs. For the SAX chapter, I managed to download a xerces.jar file to use for the various SAX classes therein. I managed to get every example working using the following settings:
Code:
set PATH="d:\jdk1.3.0_02\bin;%PATH%"
set CLASSPATH=".;d:\xml\jar\xerces.jar;%CLASSPATH%"
Again, for the DOM chapter, everything went OK. However, in the Advanced DOM chapter, an example requiring HttpServlet classes was described. I downloaded J2EE from Sun, and tried the following to get these to compile:
Code:
set PATH="d:\jdk1.3.0_02\bin;%PATH%"
set CLASSPATH=".;d:\xml\jar\xerces.jar;d:\j2sdkee1.3\lib\j2ee.jar;%CLASSPATH%"
But unfortunately, it did not seem to find the HttpServlet classes from j2ee.jar? My questions:
(1) Do I need to use 'ant' - whatever that is?
(2) Is there something wrong with my PATH or CLASSPATH?

Thanks for any advice, cheers Neil
 
I think I may have fixed it:
Code:
set classpath=".;d:\j2sdkee1.3\lib\j2ee.jar;d:\xml\jar\xerces.jar;%classpath%"
The order of jar files in the classpath seems to make the difference.
Cheers, Neil
 
Right next problem. I am trying to get this to work with Win95 (I know, I know), and I'm hitting a brick wall when I try and run j2ee.bat. This calls setenv.bat, which sets all the environment variables, but returns a syntax error on the following lines:
Code:
set JAAS_OPTIONS=-Djava.security.auth.policy=%J2EE_HOME%\lib\security\jaas.policy
set SSL_OPTIONS=-Djavax.net.ssl.trustStore=%J2EE_HOME%\lib\security\cacerts.jks
set LISTEN_OPTIONS=-Dcom.sun.CORBA.connection.ORBListenSocket=SSL:0,SSL_MUTUALAUTH:0,PERSISTENT_SSL:1060
I think this is due to the equals sign in the set value. Anyone know how to escape '=' for Win95 dos prompt?

Cheers, Neil

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top