Results 1 to 7 of 7
  1. #1
    elobire is offline Member
    Join Date
    Oct 2010
    Posts
    4
    Rep Power
    0

    Default javac not recognised

    im following this tutorial here YouTube - Java Programming Tutorial - 2 - Running a Java Program
    i get to the part when i need to use the javac command,
    when i try the command javac test.java
    i get the error message "javac is not recognised as an internal or external command,operable program or batch file"

    iv changed the path to
    C:\Java\jdk\bin\javac
    but it still doesnt work
    any suggections?
    thanks

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    6

    Default

    Quote Originally Posted by elobire View Post
    iv changed the path to
    C:\Java\jdk\bin\javac
    Try C:\Java\jdk\bin

  3. #3
    elobire is offline Member
    Join Date
    Oct 2010
    Posts
    4
    Rep Power
    0

    Default

    i tried changing in to \bin and restarted my pc
    when i tried the javac command again i got a different message
    "test.java:4: reached end of file while parsing

    2 errors

    it didnt create the file

  4. #4
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    6

    Default

    show us your code. are all brackets paired? :)

  5. #5
    elobire is offline Member
    Join Date
    Oct 2010
    Posts
    4
    Rep Power
    0

    Default

    class apples {
    public static void main (string args [])){
    system.out.println("Hello");
    }


    this is the current code, should i have added a bracket at the end?

  6. #6
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    787
    Rep Power
    6

    Default

    Quote Originally Posted by elobire View Post
    class apples {
    public static void main (string args [])){
    system.out.println("Hello");
    }


    this is the current code, should i have added a bracket at the end?
    java is case sensitive :)
    string != String
    system != System

    and yes you should have to add a bracket at the end too, but one bracket is to much at (string args []))

    Java Code:
    class apples {
    	public static void main(String args[]) {
    		System.out.println("Hello");
    	}
    }

  7. #7
    elobire is offline Member
    Join Date
    Oct 2010
    Posts
    4
    Rep Power
    0

    Default

    tried that and it worked, next time il read through my code before saving it.
    thanks, youve been realy helpful:)

Similar Threads

  1. Whats the best recognised java diploma
    By Haze in forum New To Java
    Replies: 0
    Last Post: 01-27-2010, 10:09 AM
  2. javac
    By PhilArmstrong in forum New To Java
    Replies: 31
    Last Post: 11-21-2009, 04:46 PM
  3. javac?
    By sardare in forum Eclipse
    Replies: 1
    Last Post: 06-14-2008, 03:06 AM
  4. java.util.Scanner not recognised
    By pjm35@st-and.ac.uk in forum New To Java
    Replies: 4
    Last Post: 06-07-2008, 04:32 PM
  5. javac DOS
    By rdunne in forum New To Java
    Replies: 3
    Last Post: 01-01-2008, 12:49 PM

Posting Permissions

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