aspose file tools*
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "need help in compiling servlet " Watch "need help in compiling servlet " New topic
Author

need help in compiling servlet

shivang sarawagi
Ranch Hand

Joined: Jun 19, 2008
Posts: 147
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\BeerSelect.java

and then executed the command javac BeerSelect.java
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
Greenhorn

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 : http://pandazen.wordpress.com/2009/01/03/javac-is-not-recognized-as-an-internal-or-external-command/



Thanks
Neel
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
Greenhorn

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: http://aspose.com/file-tools
 
subject: need help in compiling servlet
 
Similar Threads
HF: JSP & Servlets (Can't compile my first class on Windows)
Compiling a servlet
Classpath in Command line
HF: JSP & Servlets, compiling on Windows
javac not recognized as an internal external command