File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Simple CLASSPATH problem for compilation of servlets in JWS2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Simple CLASSPATH problem for compilation of servlets in JWS2.0" Watch "Simple CLASSPATH problem for compilation of servlets in JWS2.0" New topic
Author

Simple CLASSPATH problem for compilation of servlets in JWS2.0

Sami Ather
Greenhorn

Joined: Feb 07, 2001
Posts: 2
I have installed Java Web Server on win98.
In order to compile any servlet, one has to set classpath as c:\JavaWebserver2.0\lib\servlet.jar
If I set this variable in my autoexec.bat,like set CLASSPATH = c:\JavaWebServer2.0\lib\servlet.jar;%CLASSPATH% now If I try to compile the applet
javac HelloWorld.java
compiler gives me error - javax.servlet.*; &
javax.servlet.http.*; not found
but if on commmand line I type
javac -classpath c:\JavaWebServer2.0\lib\servlet.jar HelloWorld.java
then servlet will compile corectly and can be executed on server any idea what is wrong in setting classpath in autoexec.bat file Thanx in Advance
Sami
Pawan Sinha
Greenhorn

Joined: Jan 16, 2001
Posts: 10
Do u know after setting the autoexec.bat file u have to restart the computer or run autoexec.The other solution is set the classpath directly from the dos prompt.Write the command
set classpath="%classpath%;JWS.../lib/jsdk.jar". Probably this will help you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple CLASSPATH problem for compilation of servlets in JWS2.0
 
Similar Threads
problem with classpath..need help..
'javax.servlet . * package does not exist !'
Any Developer Using JavaWebServer2.0. please try to answer this
javax\servlet
error with compiling servlet