• Post Reply Bookmark Topic Watch Topic
  • New Topic

Run a servlet  RSS feed

 
Antonio Paulo
Greenhorn
Posts: 1
MS IE MySQL Database Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody

I'm a new java servlet user.
In the Windows 7 DOS prompt i typped the pass to my servlet.java.
The OS doesn't recognize the instruction javac as a valid command line.
Please help me to solve this problem.
Best regards.

Antonio Paulo.
 
Vivek sri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your Java SDK bin directory is not set in the Wondows 7 Path. Hence window is not able to recognize it as a valid command.
You can copy the servlet.java file in the bin directory of your Java SDK folder and run it from there.
 
Hardik Mishra
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Append 'PATH' environment variable to path of of your Java SDK and separate it via ;(Semicolon.

Create a CLASSPATH environment variable and set its value to . (Dot) and then add semicolon and
also enter path of Tomcat/lib/servlet-api.jar

You will need HTTP* classes explicitly to compile servlets.

Now, you should be able to run javac from command prompt
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!