Environment variables to point to the Java compiler


  1. Posts : 12
    Windows 7 Ultimate x64
       #1

    Environment variables to point to the Java compiler


    Hi everyone

    I have recently installed the Java Development Kit 6 in my Windows 7 Ultimate 32 bit installation but not been able to set the path to the javac compiler in the Environment Variables. What I have done so far is:

    1. Opened the Environment Variables dialog obx
    2. Created a new PATH to C:\Program Files\Java\jdk1.6.0_20\bin under User Variables
    3. Added C:\Program Files\Java\jdk1.6.0_20\bin to the right end of the series of directories called 'Path' under System Variables
    The instructions on this in the Oracle website seems to be written for Windows XP and apparently different setup is required for Windows 7. All I want to do is every time I launch Command Prompt, the Prompt knows where javac.exe is so it can execute it without my typing the path to the compiler.

    I would like to have as much as avice/instructions as possible because it has been nagging me for quite some time and irresolvable.

    Thank you in advance,

    Derek
      My Computer


  2. Posts : 2,752
    Windows 7 Pro x64 (1), Win7 Pro X64 (2)
       #2

    derek2809 said:
    Opened the Environment Variables dialog obx
    1. Created a new PATH to C:\Program Files\Java\jdk1.6.0_20\bin under User Variables
    2. Added C:\Program Files\Java\jdk1.6.0_20\bin to the right end of the series of directories called 'Path' under System Variables
    You don't want to add a new user variable for PATH.

    You just want to add your Java JDK bin library TO THE END OF THE EXISTING PATH VARIABLE that currently exists in the system area of the environment variables, as you've done (presumably you've correctly prefixed this new appendage with a ";" to separate it from the prior item in the existing PATH list). That really should work.
      My Computer


  3. Posts : 12
    Windows 7 Ultimate x64
    Thread Starter
       #3

    Yes, I also tried adding the path to the JDK directory to the right end of the system variable Path with no luck. In that incident I did not include PATH to the users variable. Command Prompt returned:

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

    Any more advice would be appreciated.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:55.
Find Us