Sunday 17 July 2016

Java Environment Set Up

Run Java Program:- We need to install Java Development ToolKit JDK, which is bundled with Java Run Time Environment.

At this time , the latest version of JDK version is JDK 8.
Step1:- All of java JDK download to Oracle website and download the latest version you will find.
You do not know which website you download JDK Simply click this link and download the JDK Download Download JDK and run the .exe to install java in your computer. Once you install the java in your computer. you will need to set up the environment variable to correct installation directory.

How to set path in Java
The path is required to be set for using tools such as javac, java etc.

If you are saving the java source file inside the jdk/bin directory, path is not required to be set because all the tools will be available in the current directory.
But If you are having your java file outside the jdk/bin folder, it is necessary to set path of JDK.
There are 2 ways to set Java path:

  1)  Temporary
  2)  Permanent

1) How to set temporary Path in Java
Ans:- To set the temporary path of JDK  you need three steps
Step 1:-  Open cmd
Step 2:- copy the path of jdk/bin directory Assuming you have installed Java C:\Program Files\Java\jdk1.8.0_60\bin copy this address and Open 
Step 3:-  write in command prompt: set path=copied_path
e.g. set path=C:\Program Files\Java\jdk1.6.0_23\bin
 How to set Permanent Path in Java

Open My Computer Right click----------Click Properties------------Advanced system setting----------Environment Variable ---------- show this page
Click new show this page
 write variable name path and variable value copy this adress and paste it it in variable value  see this example 


click ok -----------ok-----------ok. Your path has been set. this path adress is permanately set. you can save any file any drive you can run it. You can save anyC:\Program Files\Java\jdk1.8.0_60\bin this address is show in your computer Open My computer C Drive -----------Program Files----------Java -----------Jdk -------bin  
Learn More Click this link

No comments:

Post a Comment