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

Discussion in 'Java' started by cormacdebarra@gmail.com, Nov 11, 2006.

  1. Guest

    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
     
    , Nov 11, 2006
    #1
    1. Advertising

  2. Daniel Dyer Guest

    On Sat, 11 Nov 2006 22:42:34 -0000, <> wrote:

    > 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.

    --
    Daniel Dyer
    http://www.uncommons.org
     
    Daniel Dyer, Nov 11, 2006
    #2
    1. Advertising

  3. Guest

    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
     
    , Nov 12, 2006
    #3
  4. Guest

    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
     
    , Nov 12, 2006
    #4
  5. Try actually running the javac command from the bin directory. That's
    probably the best start.

    I've got some free multimedia tutorials on running compiling and
    running code with javac and the java command line utilities. Check them
    out at www.mcnz.com They're free. ;)

    Cheers!

    -Cameron McKenzie

    Free Java Certification Mock Exams: www.scja.com
    Free Multimedia Tutorials: www.mcnz.com

    www.examscam.com www.technicalfacilitation.com www.cameronmckenzie.com


    wrote:
    > 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
     
    www.pulpjava.com, Nov 12, 2006
    #5
  6. suken Guest

    wrote:
    > 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.
     
    suken, Nov 13, 2006
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ê÷Éϲä»Ò
    Replies:
    6
    Views:
    2,864
    cn.popeye
    Feb 24, 2006
  2. chrisdude911
    Replies:
    10
    Views:
    135,624
    srk289
    Mar 10, 2009
  3. Marc van Dongen

    Compiler Bug?? (javac 1.6.0_0-internal)

    Marc van Dongen, Dec 21, 2008, in forum: Java
    Replies:
    12
    Views:
    1,004
    Andrew Thompson
    Dec 28, 2008
  4. Erick

    vsdico file not recognised

    Erick, Jun 18, 2008, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    133
    Erick
    Jun 18, 2008
  5. MoshiachNow
    Replies:
    11
    Views:
    2,904
    Sisyphus
    Sep 6, 2006
Loading...

Share This Page