Here, What we basically trying to do is using javac (the Java Compiler) to compile our Java programs and java
(the Interpreter) to run our program.
Step-1 : Download and install Java (JDK) Download and install the latest version of the Java Platform, Standard Edition Development Kit (Java SE 6 Update 27). (You can skip this step if java is already installed in your system ) Step -2 : Setting the System Variable - To enable our Windows to find java compiler and java interpreter we need to set the environment variables Goto : My Computer(right click) Properties Advanced system settings -> Environment Variables System variables PATH.
-
Paste at the start (prepend) C:\ProgramFiles(x86)\Java\jdk1.6.0_27\bin;(dont
forget to put semicolon, because it separates other variable) to the beginning of the PATH variable.
- Click OK to all .
Step -3 : Check your hard work !!!
- Open the command prompt (go to run Run type cmd press enter) - To check your java version, type :
C:\Users\username>java version (in my case user name is Kaandi Production)
Then,
C:\Users\username>javac version Youll get something like below