Using this: SET JAVA_HOME=C:\jdk1.3.1 SET J2EE_HOME=C:\j2sdkee1.3 SET PATH=%PATH%;%JAVA_HOME%\bin;%J2EE_HOME%\bin SET CLASSPATH=%JAVA_HOME%\lib\tools.jar;%J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\jhall.jar;. I created a servlet and compiled using: javac -classpath MyServlet.java The compile gave no errors and appeared to compile properly; however I cannot find MyServlet.class anywhere. If I compile a non-J2EE class in the same directory, the .class file shows up as it should.
The -classpath option for the java compiler javac is used to specify external jar files for the compiler to look for. I don't know if this is causing your problem, but you can ommit the -classpath option. So just do: javac myServlet.java
I found the problem. There was actually a syntax error in the code. The confusing part is that the compiler never alerted me. The command prompt went to the next line as though the compile were successful. Any ideas why that would happen?