Quote:
Originally Posted by lse123
"javac issues: Your CLASSPATH variable isn't set correctly." EVENT IF NORMAL JAVA COMPILES WELL LIKE
import java.sql.*;
import java.io.*;
I THINK ONLY servlet IMPORTS GIVE ERROR AND SOME servlet CLASSES, WELL ?
Other matter solved ...
|
Java is searching for the servlet classes and it is not finding them.
Code:
package javax.servlet.http does not exist
This means that with every entry in CLASSPATH, java looked to see if it could find entry/javax/servlet/http. It looked inside any .jar files listed. It probably also looked in some default location, which is how it found the standard packages java.sql.* and java.io.*.
That's just how it works. You need to figure out where the servlet classes are and set your CLASSPATH variable to include them.
They ought to already be in your classpath. A common problem is if you have multiple JVMs installed. You have, guaranteed, 2 since you have a JRE and a JDK, probably more, and some OSs ship with 4 or 5 installed.
It is a huge pain in the butt, but you need to figure it out if you're going to use Java to do stuff. (Just about every language has some variant of this problem, incidentally.) Google "problem with classpath"; you're not the only one with this problem.