Hi there. Try the following
1. create the following batch file @echo off set JAVA_HOME="D:\j2sdk1.4.1_01\" set CATALINA_HOME="D:\Program Files\Apache Tomcat 4.0" set CLASSPATH=".;%JAVA_HOME%\src.jar;%JAVA_HOME%\lib\tools.jar;% CATALINA_HOME%\common\lib\servlet.jar" REM compile the stuff javac -classpath %CLASSPATH% %1 2. Then you run the batch file like compile.bat HelloWorld.java To actually set environment vars in XP, do the following 1. Right click on my computer 2. Select "properties" 3. Click on the "Advanced" tab 4. Click on "Environment Variables" 5. Define the necessary variables that you need... you would probably want to define them in System 6. Close all Console windows that are currently open and restart them 7. Test your variables by echo'ing them out i.e. echo %CLASSPATH% Hope that helps. Jan-Michael ----- Original Message ----- From: "Tammer Salem" <[EMAIL PROTECTED]> Date: Friday, January 10, 2003 3:52 am Subject: Unsure how to set environment variables for win xp > Hi, > I'm having problems compiling my servlets. I know this is probably > out of the domain of tomcat setup, but I decided to ask anyway. > I have a servlet called (test.java) in a directory (D:\Program > Files\Apache Tomcat 4.0\webapps\test\WEB-INF\classes). My > javac.exe is in (D:\j2sdk1.4.1_01\bin). I can't get the servlet > file to compile. I think my CLASSPATH and Path environment > variables are messed up, because I keep on getting the following > exceptions: > ================================= > HelloWorld.java:2: package javax.servlet does not exist > import javax.servlet.*; > ^ > HelloWorld.java:3: package javax.servlet.http does not exist > import javax.servlet.http.*; > ^ > HelloWorld.java:11: cannot resolve symbol > symbol : class HttpServlet > location: class HelloWorld > public class HelloWorld extends HttpServlet > ^ > HelloWorld.java:13: cannot resolve symbol > symbol : class HttpServletRequest > location: class HelloWorld > public void doGet(HttpServletRequest request, > HttpServletResponse response) throws ServletException, IOException > > ^ > HelloWorld.java:13: cannot resolve symbol > symbol : class HttpServletResponse > location: class HelloWorld > public void doGet(HttpServletRequest request, > HttpServletResponse response) throws ServletException, IOException > > ^ > HelloWorld.java:13: cannot resolve symbol > symbol : class ServletException > location: class HelloWorld > public void doGet(HttpServletRequest request, > HttpServletResponse response) throws ServletException, IOException > > > ^ > 6 errors > ================================= > > Can anyone please help me? > > > thanks, > Tammer Salem > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
