Results 1 to 6 of 6

Thread: java installation error - javac

  1. #1
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question java installation error - javac

    I have downloaded the following:
    jdk1.6.0_07 and
    jre1.6.0_07 to my Laptop.
    I am running Windows XP.
    When I am testing the version in Dos: java -version, it does display the correct version.
    When I try to compile ex: javac Welcome.Java, it gives me an error saying:
    "Javac unrecognized".
    I have tried to add the following to the Environment Settings but with no luck:
    c:\jdk1.6.0_07\bin;

    Please can somebody assist, I reaaly want to start learing how to program in Java as soon as possible. I come from a DB2 Cobol Background.

    Regards
    Judy
    Last edited by judy; 08-25-2008 at 08:16 PM. Reason: need email notification

  2. #2
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    try c:\jdk1.6.0_07\bin\javac welcome.java in the command prompt.
    Please don't mind me. I am just posting a lot of nonsense.

  3. #3
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Java Installation JAVAC Unknown Error

    Thanks it worked, but it's a long typing road. Aren'y you suppose to just type in JAVAC from anywhere instead of be in the path where it's stored.

    Example: c:\jdk1.6.0_07\bin\Welcome\javac Welcome.java ?
    Versus: c:\ jdk1.6.0_07\bin\javac Welcome.java or even only c:\javac Welcome.java ????????

    Thanks
    Judy

  4. #4
    Join Date
    Mar 2008
    Posts
    218
    Thanks
    7
    Thanked 19 Times in 19 Posts

    Default

    it is easier to put java in a c:\java directory without the dots and include it in your path. I think it is because dos doesn't like filenames/pathnames with dots.

  5. #5
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    do u have a screenshot of ur Environment Settings specifically the path settings?

    coz i tried what u do did.....

    I have tried to add the following to the Environment Settings but with no luck: c:\jdk1.6.0_07\bin;
    ... and mine works just fine. Im also using Windows XP.

    have u also tried removing the trailing semicolon while putting it in ur Environment Settings? coz i tried mine without it

    c:\jdk1.6.0_07\bin;
    Please don't mind me. I am just posting a lot of nonsense.

  6. #6
    Join Date
    Sep 2008
    Location
    Midland, Texas
    Posts
    52
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default

    I am also a newbie, which is to say that I just finished reading the third chapter on my Java - A Beginners Guide (Control Statements). I was having the same problem when trying to install and run Java in my laptop. I found the answer in the back of the book. The reason why I was having problems is because the Java "jdk1.6.0_07\bin " was not part of my "path". The following is how I fixed it:

    1. Right click on the "My Computer" icon.
    2. Click on "Properties".
    3. Click on "Advanced System Settings".
    4. Click on the "Advanced" tab.
    5. At the bottom of that window, click on "Environment Variables".
    6. On the next window, scroll on the bottom window and look for "Path" on the left side.
    7. Click on "Edit" and go to the end of that line and enter ";" and the path to your "bin" folder.

    In my computer the location was: C:\Program Files\Java\jdk1.6.0_07\bin

    I hope this helps. If I am wrong on this, please reply and share the answer so I'll know for the future. Cheers!

Bookmarks

Posting Permissions

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