Results 1 to 4 of 4
  1. #1
    ande3674 is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default Problem compiling from command line

    I am having problems compiling HelloWorld.java.

    I have added C:\Program Files (x86)\Java\jdk1.6.0_24\bin to my Path, but I still get the error: "'javac' is not recognized as an internal or external command, operable program or batch file" when I type "javac HelloWorld.java" from C:\Users\Steve\Desktop\Java (where HelloWorld.java is saved).

    I then tried it this way:

    C:> "C:\Program Files (x86)\Java\jdk1.6.0_24\bin\javac" HelloWorld.java and it says "Access is denied".

    I can't figure out why it just refuses to work, can anyone help me out?

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,789
    Rep Power
    7

    Default

    Make sure you open a new command line window after changing your environment variables.

  3. #3
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    If that doesn't work, try following this tutorial, when I first started I used it and it helped me out quite a bit.

    TheNewBoston – Free Educational Video Tutorials on Computer Programming and More! Java

    The first one installs it and sets the path, I believe the second one creates a hello world program and runs it.

  4. #4
    ande3674 is offline Member
    Join Date
    Apr 2011
    Posts
    2
    Rep Power
    0

    Default

    I did open a new command line window and it still didn't work.

    I will try the tutorial, thanks!

Similar Threads

  1. Replies: 7
    Last Post: 02-10-2011, 07:37 PM
  2. Compiling java code from the command line
    By alman9898 in forum New To Java
    Replies: 5
    Last Post: 10-13-2010, 03:35 AM
  3. Replies: 2
    Last Post: 07-02-2010, 02:20 PM
  4. Replies: 1
    Last Post: 06-30-2009, 02:32 PM
  5. 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

Posting Permissions

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