Results 1 to 5 of 5

Thread: Javac Problems

  1. #1
    Cookie is offline Unexperienced
    Join Date
    Dec 2011
    Location
    United Kingdom
    Posts
    2
    Rep Power
    0

    Exclamation Javac Problems

    So I'm very new to Java and I only just got a book on it today,
    Javac -version comes up with

    'Javac' is not recognized as an internal or external command,
    operable program or batch file.


    The fact I have a 32-bit Operating System and the only choices were x64 and x86, So I followed the book and took x86 whether this is the cause of the
    problem I have no idea.

    I've set the PATH and CLASSPATH to what I think they should be, but i have also went into Javac directory and tried opening javac.exe and it opens a
    command prompt and closes straight away.

    If you need anymore information please ask and explain how I can gain it.

    Thank you.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,773
    Rep Power
    25

    Default Re: Javac Problems

    Where is the javac.exe file?
    Did you add the path to the folder containing the javac.exe file to the OS's PATH environment variable?

  3. #3
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,569
    Rep Power
    12

    Default Re: Javac Problems

    A good place to start is the simple step by step instructions on the Hello World page of Oracle's Tutorial.

    The problem you mention is the first on their list of common problems. They link to notes on how you set the path in Windows.

    Note the comment in the setting the path instructions that the new path only applies in command windows opened after you make the change. Also javac.exe won't do much if you double click its icon in WindowsExplorer - it's not supposed to. Finally the best thing to do with the CLASSPATH environment variable is nothing. And if it does have a value already, ignore it. The classpath can always, and unambiguously, be set when you run javac.exe (or the other executables).

  4. #4
    Cookie is offline Unexperienced
    Join Date
    Dec 2011
    Location
    United Kingdom
    Posts
    2
    Rep Power
    0

    Default Re: Javac Problems

    Thank you pbrock I think that Hello World along with the book well help me on my journey a lot :)

    And I made a school boy error I've been over it several times checking but just forgot to put ; in. Feeling a tad silly now!

    Thank you very much :D

  5. #5
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,569
    Rep Power
    12

Similar Threads

  1. help with javac
    By copy you in forum New To Java
    Replies: 8
    Last Post: 09-18-2011, 09:54 PM
  2. Replies: 1
    Last Post: 11-03-2010, 09:49 AM
  3. Javac Problems
    By franzwarning in forum New To Java
    Replies: 4
    Last Post: 10-28-2010, 06:25 AM
  4. Problems with javac
    By gkoef in forum New To Java
    Replies: 14
    Last Post: 09-07-2010, 11:17 AM
  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
  •