File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes need help in compiling servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "need help in compiling servlet " Watch "need help in compiling servlet " New topic

need help in compiling servlet

shivang sarawagi
Ranch Hand

Joined: Jun 19, 2008
Posts: 153
I am trying to compile the servlet file from command prompt,
i opened command prompt and changed the directory structure to my file location i:e C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\BeerV1\WEB-INF\src\com\example\web\

and then executed the command javac
but i am encountering the following error :javac is not recognized as internal or external command, operable program or batch file

Please anyone help. What am i missing ??
Neel Sharma

Joined: Aug 16, 2011
Posts: 12
Hi Shivangi, Can you try installing Java again and make sure you set you Java_Home correctly.

I hope this helps you :

Ram Narayan.M
Ranch Hand

Joined: Jul 11, 2010
Posts: 247

Please add jdk path in which you have installed in "PATH" environment variable...

SCJP 6 [SCJP - Old is Gold]
bhanu chowdary
Ranch Hand

Joined: Mar 09, 2010
Posts: 256
Alternatively, you can use the complete path of javac.exe in the bin directory of your jdk installation. But setting the PATH environment variable is preferred so that you can use the javac command directly.
Deepthi Tanguturi

Joined: Sep 06, 2011
Posts: 17
First check installation of java.
Set JAVA_HOME as path variable and also set classpath as rt.jat,tools.jar files.Once you set these paths please restart the command prompt.
Abhay Choubey
Ranch Hand

Joined: Jun 02, 2011
Posts: 34
First check java is installed properly or not. Then set a path of your java in system variable. Than execute it it will run.
May be there is problem with your java installation or problem with setting the path of java.
I agree. Here's the link:
subject: need help in compiling servlet
It's not a secret anymore!