javac is not recognised as an internal or external command, operable program or batch file

C

cormacdebarra

Hi
I get the above error when i try to compile a java program. I have
included it in the CLASSPATH. The CLASSPATH looks like this:



C:\PROGRA~1\BORLAND\CBUILD~1\PROJECTS\BPL;C:\PROGRA~1\BORLAND\CBUILD~1\BIN;­%SYSTEMROOT%\SYSTEM32;%SYSTEMROOT%;%SYSTEMROOT%\SYSTEM32\WBEM;C:\WWW\APACHE­2\BIN;C:\WWW\MYSQL\BIN;C:\WWW\PERL\BIN;C:\WWW\PHP5;C:\WWW\APACHE2\BIN;C:\WW­W\MYSQL\BIN;C:\WWW\PERL\BIN;C:\WWW\PHP5;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM­;C:\WINDOWS\SYSTEM32;c:\Program

Files\Java\jdk1.5.0_09\bin;



The last one is for java . ive checked if javac is in that bin folder
and it is


Please help before i go insane
Thanks
 
D

Daniel Dyer

Hi
I get the above error when i try to compile a java program. I have
included it in the CLASSPATH. The CLASSPATH looks like this:

The Java tools (java.exe and javac.exe) need to be on the PATH, not the
CLASSPATH. You shouldn't even need a CLASSPATH environment variable.

Dan.
 
C

cormacdebarra

Javac works now. My program also extends the servlet class. but it now
gives me 6 errors.....package javac.servlet does not exist.


import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;


public class BeerSelect extends HttpServlet
{

public void doPost(HttpServletRequest request,HttpServletResponse
response)throws IOException, ServletException
{.........................

How would one go about fixing this?
Thanks
 
C

cormacdebarra

Javac works now. My program also extends the servlet class. but it now
gives me 6 errors.....package javac.servlet does not exist.


import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;


public class BeerSelect extends HttpServlet
{

public void doPost(HttpServletRequest request,HttpServletResponse
response)throws IOException, ServletException
{.........................

How would one go about fixing this?
Thanks
 
S

suken

Javac works now. My program also extends the servlet class. but it now
gives me 6 errors.....package javac.servlet does not exist.


import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;


public class BeerSelect extends HttpServlet
{

public void doPost(HttpServletRequest request,HttpServletResponse
response)throws IOException, ServletException
{.........................

How would one go about fixing this?
Thanks

Try ading j2ee.jar in your classpath.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top