Ranchers, Please help me with this one. Its breaking me. OS = WIN98 Using J2SDK1.4.0 to compile Servlets My java source files are kept in c:\ServletDevel Tomcat4.0 is in c:\Tomcat4 servlet.jar is in c:\Tomcat4\common\lib\ Autoexec.bat contents reads as follows: SET JAVA_HOME=C:\j2sdk1.4.0; SET CATALINA_HOME=C:\tomcat4; SET CLASSPATH = .;c:\ServletDevel;c:\Tomcat4\common\lib;c:\Tomcat4\common\lib\servlet.jar //all on one line When I compile - cannot find javax.servlet or javax.servlet.http I followed the instructions from More Servlets and JSP By Marty Hall. What is wrong? Please advise. I need to move on. Regards Stephen Batsas SCJP2
try this: SET CLASSPATH = %CLASSPATH%;.;"C:\ServletDevel";"C:\Tomcat4\common\lib";"C:\Tomcat4\common\lib\servlet.jar"; I don't use W98 so this is a naive guess. you might need to restart [ February 26, 2002: Message edited by: ersin eser ]
Fellas, Its not working so I have created a batch file to point to the servlet.jar when compiling. Also I discovered that if there is more than one dependent java file (eg ServletUtilities.java & HelloServlet.java). To compile both succesfully in a package ( eg c:\ServletDevel\moreservlets ) I use @project.list at the command line arg. So Finally I can compile the java source files and deploy them to the required directory. The only constraint is having to copy the jcompile batch file to each new package directory. Note that there is package directory for source as well as the generated class files. I open to any other suggestions. Remember none of the above classpath statements inserted into my autoexec.bat file had any effect. Regards Stephen Batsas SCPJ2
I open to any other suggestions. Remember none of the above classpath statements inserted into my autoexec.bat file had any effect Do this - open a new DOS window. type "echo %CLASSPATH%" without the quotes and let us know what it says. we will go from there......... - satya
Take a Minute, Donate an Hour, Change a Life
Ranchers, This is my autoexec.bat SET JAVA_HOME=C:\j2sdk1.4.0 SET CATALINA_HOME=C:\Tomcat4 SET CLASSPATH =%CLASSPATH%;.;"C:\ServletDevel";"C:\Tomcat4\common\lib";"C:\Tomcat4\common\lib\servlet.jar" //note above is on one line of course When I compile - cannot find javax.servlet.*; I have to point to it in a batch file What is wrong with the autoexec statement. Regards Stephen Batsas SCPJ2 PS I got my SCPJ pin today. Do you actually wear this?
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop