File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

a bit confused

 
jayram joshi
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
TIA
Cheers
Jayram
 
Bhupinder Dhillon
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When invoking javac you have to specify the .jar file in classpath argument.
eg: javac -classpath <pathToJarFiel>\servlets.jar filenames
 
jayram
Ranch Hand
Posts: 94
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bhupinder,
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???

------------------
Cheers
Jayram
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic