
Java Help , Java Programming , Java Tutorials:: How to set command Path in Windows 7 for Java compiling and coding
how to set up java command path.
Before you get ahead of yourself, you cannot compile java without installing JAVA software on your computer.
Verify you have Java installed > If you do not have it installed go to the link below. (JAVA DOWNLOAD)
http://java.com/en/download/installed.jsp?detect=jre&try=1
After you have verified that Java is installed on your computer you will need to download a Java Development Kit (JDK).
WTF is a Java Development Kit? Answer: In layman’s terms a JDK contains all the tools you will need to compile, design, build, and develop your Java Programs > You cannot program anything without it! Here is the link: http://java.sun.com/javase/downloads/widget/jdk6.jsp
Install your JDK and proceed to the Command Prompt / Java Tutorial.
Setting up your command path in Windows 7 is much easier than trying to set up in Vista because of all the security features. A lot of the unnecessary securities methods in Vista have been eliminated in Windows 7, this update will definitely make life easier, (at least your computer life). Java Help:: Follow the steps below.
- From your desktop, right-click My Computer and select the Properties option.
- In the System Properties window, click on the Advanced tab.
- In the Advanced section, click the Environment Variables button.
- Finally, in the Environment Variables window (as shown below), highlight the Path variable in the Systems Variable section and click the Edit button. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.
- Add the code to the existing System variable path shown in the blue highlighted section in the picture below. Do not delete the original variable; you are only adding code to it.

Click here or picture for full view
6. Before you add the path code it will look like a lot like the code below (Your items in bold may be different):
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\iZotope\Runtimes;C:\Program Files\Common Files\DivX Shared\;C:\Program Files\QuickTime\QTSystem\
Java Help Update ::Ensure you have the latest version of JDK installed on your computer look for = c:/Programs/java/jdk???_??
7. After you add this JDK path>( ;C:\Program Files\Java\jdk1.6.0_21\bin; ) , it should look like the code below:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Runtimes;C:\Program Files\Common Files\DivX Shared\;C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program Files\QuickTime\QTSystem\
The code you added is underlined
Now restart your computer after the changes:
That’s it! Now try out a couple of commands and codes. Did this Java Tutorial help ?




Liesa
Hi there Will. I need help regarding the java compiler.
I think I accidentally deleted the original path and now I don’t know what my original path should be. Is there any way to find out what should be there? Or maybe could I copy yours that you stated in the post?
Will
@ Liesa
Try to restore your computer to a date before you changed your command path. Do not copy my path because it has other programs within the path.. tHIS Tutorial is based on windows 7 requirements. If you have windows 7 32bit then you can try my code ,(do not copy the bold part of the code). lemme know what happens.
Liesa
@ Will:
Hi Will. I managed to restore the path. My laptop restored the path when I restarted it. Phew. Although before I reboot I did tried copying some paths I found online but it didn’t help much.
Say hypothetically, if laptops didn’t have system restore, what would happen?
Will
lol… as long as you have windows operating system you should be good. But if you didnt have system restore that could be an issue.. that is why i recommend you perform a routine system backup to an external drive or burn it to a dvd or blue ray disc.
Will
@ Liesa:
“Say hypothetically, if laptops didn’t have system restore, what would happen?”
You would most likely loose your data and previous system settings.. But any good techie would be able to restore a few default system settings and files.