Friday 17 June 2016

Java Environment Setup

The reason behind adding the path to environment variable is that you need not go to java executables path again n again while compiling and running java files.  

Download Java.

Setting environment variable is not compulsory, but it is recommended.

If you do not set the PATH variable, you need to give full path of executables everytime you run it. such as:


C:\Java\jdk1.7.0\bin\javac ClassName.java


How to setup:

Right click on my computer.

Select Property option.

Now from property select Advance system Setting option.

click on new button and variable name.



Now go to path variable under system variable menu.

and add JAVA_HOME variable to path like as follows.

%JAVA_HOME%\bin



Click ok and close all windows.

To test the settings open command prompt and type 
java -version and hit enter.










No comments:

Post a Comment