This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes a bit confused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "a bit confused" Watch "a bit confused" New topic

a bit confused

jayram joshi

Joined: Aug 05, 2000
Posts: 23
hello frens,
I downloaded tomcat and was trying to run my program
I was getting messages like...
import package not found for servlet and HttpServlet packages.So i used jar and unzipped the jar file ...and now my servlets got compiled ...but it doesnt make sense ...does it to u??
Please throw some light on this...
Bhupinder Dhillon
Ranch Hand

Joined: Oct 12, 2000
Posts: 124
When invoking javac you have to specify the .jar file in classpath argument.
eg: javac -classpath <pathToJarFiel>\servlets.jar filenames
Ranch Hand

Joined: Oct 30, 2000
Posts: 94
The solution u provided is for the case where the classpath is not already set.My classpath is set correctly so i dont think I need to provide it explicitly while invoking java compiler.What puzzled me is the fact that same classpath worked for me when I extrated classes from servlet.jar file .Please...can anyone throw some light on this phenomenon ...why did this happen???

I agree. Here's the link:
subject: a bit confused
Similar Threads
Problem with the use of external library from a jar archive
Executing my .java in package
MANIFEST needed in submission.jar?