Results 1 to 3 of 3
  1. #1
    bugger is offline Senior Member
    Join Date
    Nov 2007
    Rep Power

    Default Not able to compile

    When I try to compile the java files, I get the following error message:

    Java Code:
    'javac' is not recognized as an internal or external command, 
    operable program or batch file
    I checked, I have Java 1.5 on my machine. Its a strange error for me. Please advice.

  2. #2
    vagarwal_mca is offline Member
    Join Date
    Jan 2008
    Rep Power


    u have not set the path of the bin directory

  3. #3
    gibsonrocker800's Avatar
    gibsonrocker800 is offline Senior Member
    Join Date
    Nov 2007
    New York
    Rep Power


    Quote Originally Posted by vagarwal_mca View Post
    u have not set the path of the bin directory
    Yep, he's right. The thing is that i had this problem when i first started and someone told me that, but i didn't know what it meant. So, here's what you do (im assuming that you're using windows, i don't know how to do it with any other OS).

    Ok, find out where your compiler is located. It's most likely going to be in C:\Program Files\Java\jdk1.6.0_02\bin (or whatever version of jdk you have). So, get the location of the bin folder in your JDK, and copy it.

    Now, go to Start, Control Panel, Performance and Maintenance, System, Advanced tab, Environment variables, then go to the section labeled "System", and highlight the part called "Path" and and click Edit. Now, at the end of the text, put a semicolon (; ... if there isn't one already) and then paste the file path of your bin directory that you copied before. Make sure there's no space in between the semicolon and the filepath. Now click OK, and everything should work.

    Let me know if you have any problems

Similar Threads

  1. Compile Trouble
    By adelgado0723 in forum New To Java
    Replies: 5
    Last Post: 04-21-2008, 02:02 AM
  2. How to compile an applet to an exe
    By elizabeth in forum Java Applets
    Replies: 4
    Last Post: 02-18-2008, 03:57 AM
  3. Unable to compile
    By gapper in forum New To Java
    Replies: 2
    Last Post: 01-14-2008, 04:31 PM
  4. compile error
    By dirtycash in forum New To Java
    Replies: 6
    Last Post: 12-12-2007, 06:00 PM
  5. Compile a program
    By toby in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 09:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts