I added the classpath to the user variables. I tried running the command on Windows 2000 command prompt javac -classpath C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar -d classes src\Ch1Servlet.java
The command prompt does seem to recognize the spaces between the filename. Even adding the classpath to the environment variable does not work.
Anyway I found a work around by copying the servlet-api.jar on root C: drive and then modify the command to generate the java classes
This does compiles and generates the classes, but I am curious if anybody had this problem in Windows 2000 and solved it the conventional way. Please suggest a solution, I am bit restless to make it workconventionally.
I love your bottomline But double quotations do work. Check your path again. For example : dir C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib\servlet-api.jar
If it still doesn't work, try to add it to your environment: 1. Right-Click My Computer, Properties 2. Details/Environment variable 3. look for CLASSPATH (or create it) and add the full path to your JAR file 4. Click OK and restart a new command prompt
Thanks the real problem was I didn't have the classes folder to output the classes file in place. But the command prompt error I got for that was absurd. I got import statement errors related to servlet-api.jar.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop