When I first decided to learn Java all alone, the first major setback I faced was how to setup the java compiler in Windows 7 (same for windows vista). Most of the search I did gave confusing description and were based on Windows XP which is kind of history now.
For guys who are new to Windows Vista and 7 following is the detailed description of setting up your java compiler:
- Download the Java Development Kit (JDK). You can download it here.
- Follow the instructions and install the JDK.
- Right-click the Computer icon on your desktop or start menu, click on properties.
- Click on Advanced system settings. A dialog box appears.
- Click on the Environment Variables button at the bottom-right of the System Properties dialog box.
- A dialog box named Environment Variables appears. Click on the TEMP variable in the User variables section. Now go down to the “Path” variable in the System Variables section and click on edit.
- The Edit System Variable dialog appears. At the end of the Variable value section append a semi-colon and then enter the path of the bin directory of you JDK. To copy the path of the bin directory follow the picture below
- Then paste the path on the field as shown below. Make sure you have appended a semi-colon before you paste the address.
- Then click on OK as shown and then you are done. To confirm whether your settings are right, open command prompt and type “javac”. You should get a response like this on your prompt.
- Type ”java” and you should get something like this.
If all of the above steps are followed correctly, you will be able to setup your java compiler and you can now start programming.
P.S.: I recommend you to use textpad instead of the usual command line interface to do your java programs. Its a freeware although it will ask you to register it.
Facebook Comments for The Truth is Always Insane Special thanks to Subham Singh
10 comments:
Thanx a lot yaar......this method rocks but the only difficulty i found, that i had to restart my machine in order to set the path.
newayz htanx..
hey...thanks for the process,but i got a problem."java" command is working but "javac" command is not working after the above process.
Try Step 8 again, if it doesn't work den maybe you download JRE. I had the same prob once. I installed JDK and then javac worked
Hey prasannajeet, I have a problem... i followed your advice and downloaded the JRE and reinstalled it to my comp I already have the JDK installed in my computer but javac still does not work while java on the other hand works. what is your advice?
Did you try doing Step 8 again?
Thank you so much! =D
Thank you very much,... it worked in few secs...
Thanks for your help..
and of couse it works if you follow correctly these steps..
thanks... it works fine
thnk u..itz wrkng fine with javac bt wn i type java itz displayng couldnt open...do i need 2 install jre also?or jdk hvng jre ?
Post a Comment