Tuesday, August 7, 2012
This post is for all who has just started learning java or planning to do so. If you are from a C/C++ background then you will see that you didn't have to do all these things. You only had to install TurboC. But in Java it is necessary to set the path as without it you cannot compile or run a java program from command prompt if your source file resides in a different location as that of the compiler. At that situation windows won't be able to recognize javac as a command. Many of you will think that they can compile or run from an IDE like Eclipse,NetBeans,JCreator or BlueJ. But you will understand later that many things can't be done from here which can be done from your command prompt. Follow these steps carefully :




1 : Download and install the latest version of jdk(i.e. jdk7) in order to keep yourself always updated.
2 : Go to the location where you have installed jdk and look for bin folder. the path may look like this C:\Program Files\Java\jdk1.7.0\bin. Just copy this path from the location bar.
 3 : Now right click on My Computer and select Properties. It will open the system window.
  
4 : Now select Advanced System Settings from the window as shown
5 : Now select Environment variables
6 : Now look for Path under System Variable. Either double click it or select edit after choosing it.
7 : Now go the beginning and paste the path that you have copied earlier and then give a semi-colon.
WARNING : Do not change any other things and don't forget to give the semi-colon as either of this will cause system problems.
8 : Now press OK and give Administrator permission while doing it. You will have to press OK for two times to close the other dialogs that were already open. That's it. You have successfully set the path and compile from anywhere with javac command. If still windows can't recognize the javac command then you have done some mistake in the procedure. Plz check it.

0 comments:

Post a Comment

Total Pageviews

Subscribe via Email

Followers


Popular Posts

About Me

My photo

I am a student of BTech Computer Science Engineering from RCCIIT,Kolkata. I am a crazy lover of Java and wants to settle as a Java developer. I have a seven years Java experience with an application developer experience for 2 years. Recently from March 2012 I am a registered S40 app developer for Nokia and has corrected an app of them. I am currently writing blogs to encourage and grow interest in all those who don't know or learning Java.