Results 1 to 9 of 9
  1. #1
    GilaMonster's Avatar
    GilaMonster is offline Member
    Join Date
    Jun 2008
    Posts
    9
    Rep Power
    0

    Default [SOLVED] Compile from the command line

    Hi all,

    I am trying to compile my first class from the cmd line

    I looked on the Sun site, and found instructions to modify the Environment variables

    I added:
    C:\Program Files\Java\jdk1.6.0_<version>\bin to the path statement under System variables. I prececeeded with a semicolon to seperate from other items already in the path statement

    I still receive error message at the console:
    'javac' is not recognized as an internal or external command, operable program or batch file
    What might I be doing wrong?

    Thanks!
    Best regards,
    Winston

  2. #2
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    10

    Default

    Have you added it on "Path" or "path" variable?
    freedom exists in the world of ideas

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,370
    Blog Entries
    1
    Rep Power
    22

  4. #4
    GilaMonster's Avatar
    GilaMonster is offline Member
    Join Date
    Jun 2008
    Posts
    9
    Rep Power
    0

    Default

    Thanks all

    I added to Path statement.
    I entered
    C:\Program Files\Java\jdk1.6.0<version>\bin
    Should have been
    C:\Program Files\Java\jdk1.6.0\bin
    Works great now!

    Thanks
    Winston

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,370
    Blog Entries
    1
    Rep Power
    22

  6. #6
    GilaMonster's Avatar
    GilaMonster is offline Member
    Join Date
    Jun 2008
    Posts
    9
    Rep Power
    0

    Default

    Thanks Eranga,

    I've searched around a bit and I do not see how to mark the thread solved.
    How do I do that?

    Thanks much,
    Winston

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,370
    Blog Entries
    1
    Rep Power
    22

  8. #8
    GilaMonster's Avatar
    GilaMonster is offline Member
    Join Date
    Jun 2008
    Posts
    9
    Rep Power
    0

    Default

    Thanks Eranga

    Winston

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,370
    Blog Entries
    1
    Rep Power
    22

Similar Threads

  1. Command line argument
    By denisatandi in forum New To Java
    Replies: 8
    Last Post: 10-16-2012, 11:37 PM
  2. Java command line
    By agouzoul in forum New To Java
    Replies: 2
    Last Post: 04-02-2008, 12:12 PM
  3. Exporting from the command line
    By o1121 in forum Eclipse
    Replies: 1
    Last Post: 08-09-2007, 07:29 PM
  4. Unable to execute command line command in java
    By LordSM in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 12:23 AM
  5. Replies: 2
    Last Post: 08-06-2007, 09:16 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
  •