Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Environment variables to point to the Java compiler

02 Jan 2011   #1
derek2809

Windows 7 Ultimate x64
 
 
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 System SpecsSystem Spec
.

02 Jan 2011   #2
dsperber

Windows 7 Pro x64 (1), Win7 Pro X64 (2)
 
 

Quote   Quote: Originally Posted by derek2809 View Post
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 System SpecsSystem Spec
02 Jan 2011   #3
derek2809

Windows 7 Ultimate x64
 
 

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 System SpecsSystem Spec
.


Reply

 Environment variables to point to the Java compiler




Thread Tools





Similar help and support threads
Thread Forum
Environment Variables
Hi I set up a User defined Enviro. Var. called GomFolder to be C:\Users|Damo\MyDocuments\NinjaTrader 7 See the attached clip 2015-01-23_1242 - Judge101010's library My understanding is that this should set up a folder called GomFolder in the NinjaTrader 7 folder. Is this correct? If...
General Discussion
Windows 7 Environment Variables List
Environment Variable Path %ALLUSERSPROFILE% C:\ProgramData %APPDATA% C:\Users\{username}\AppData\Roaming %COMMONPROGRAMFILES% C:\Program Files\Common Files %COMMONPROGRAMFILES(x86)% C:\Program...
Performance & Maintenance
Windows 7 Environment variables
Is there an Environment variable that can tell me where the Documents folder is located? Typically, the Documents folder is located in C:\Users\username\Documents. I am creating a batch file to copy 1 file from a remote location (another computer in the network) to the Documents folder. Since...
General Discussion
What are Environment Variables in Computer?
Hey, Can anyone explain are environment variables are within the Advanced System Settings of Computer? I've had to create a new environment variable for a Java complier, and I was just wondering what exactly are environment variables are and why are they used? Thanks, Harry P.S I've...
General Discussion
Cannot Install Java Compiler or Java Updates
The thread title states the problem. I have downloaded JDKs several times, most recently a half-hour ago. When I double-click on them, Windows prompts me to confirm that I want to install the software. When I clear the prompt ("OK"), the prompt goes away, but nothing else happens. The same...
Software
Java, Windows 7 & Environment Variables
I have installed Java in Program Files (x86) > Java > jre > bin In Environment Variables, I accidentally deleted the default PATH variable. This is what I currently have in the PATH variable: Please can someone tell me what the default PATH was? I will add this in front of the Java path. ...
Software

Our Sites

Site Links

About Us

Find 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 10:27.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App