This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I am new to servlets and getting problem in compiling the servlets. my jdk is in d:\java2 and jsdk in d:\jsdk2.0. I have set the classpath as set classpath = "d:\java2\lib\tools.jar";"d:\jsdk2.0\lib\jsdk.jar";%classpath%; and set the path as set path="d:\java2\bin";"d:\jsdk2.0\bin"; when i try to compile a simple servlet , i am getting errors like package javax.servlet not found in import. can anyone help me regarding this problem? Sridurga
Hello SriDurga, There is some problem with ur classpath settings. Better remove %classpath% and include other .jar files in classpath available in 'lib' directory. For time being copy ur .java prg in 'src' directory and copy the .class file in 'examples' directory. All the best and feel free to contact. Regards S Chandramohan
Have a wonderful day and wish u success<p>S Chandra Mohan<br />email@example.com
set the classpath to d:\jsdk2.1\src You cannot go on compiling you servlets using a -classpath always. Simply give set the classpath as given above and tehn compile your servlet using JAVAC.
Joined: Oct 15, 2000
hi, it's not working by setting classpath as d:\jsdk2.0\src; is there any permanent solution so that i can compile servlets without running javac -classpath d:\jsdk2.0=lib\jsdk.jar sourcefile.java always thanks if anyone can help me durga
Hello Sridurga, The way you have set you're classpath and path is fine. The problem you r having is the package problem. That is when you are compiling you're servlet Java code you r getting error javax.servelt.*, or javax.servlet,http.* could not found in import. In the sub-directory of you're d:\jsdk2.0\src directory there is one directory name javax. Copy this directory where you're servelt Java code is. Once javax directory is in the folder with you're servlet code run you're code again. This time it should detect you're javax package and you're code will compile as "javac filename.java", no need of using -classpath option. I think this problem is there when some one is using jdk2.0 and jsdk2.0. But this approach is not necessary when you r working with jdk2.2 and Jsdk2.2.In this case suggestion put up by other fellow will work fine. In case you are having any problem then feel free to contact me. Regards, Raj.
Regards,<P>Raj.<BR>-------------------------<BR>Afforts should be Appriciated.<BR>-------------------------