To develop any java program we need to set the path first in your PC. The fallowing are the steps to set path in Java. After installation of JAVA software in their device should set the path in their PC.Many students or beginners does not know how to set the path. Thus I covered here Two ways to set path in java.First one is temporary path setting and second one permanent set path. Let's read and set the path in your PC also.
1) To develop a java program the path required to be set for using tools such as Javac,Java
2) All the Tools available in the JDK/bin directory if you save java source file directly in this directory then setting path is not required because all the tools available in that directory.
3)In case if you want save the java source file outside of the Jdk/bin directory then set the path is required.
There are Two ways to set Java Path:
a) Temporary
b) Permanent
The steps to set java path in Windows:
To set Temporary path of Jdk, we must fallow the below steps
a) Open Command Prompt
b) copy the path of jdk/bin directory
c) Then write in the Command Promot set path=copied_path
For Example:
set path=C:\Program Files\Java\jdk1.6.0_23\bin
2) Next We see How to permanent java path of JDK in Windows:
Here are The Steps for setting the permanent path of JDK.
Go to MyComputer properties -> advanced tab -> environment variables -> new tab of user variable -> write path in variable name -> write path of bin folder in variable value -> ok -> ok -> ok
2) Click On Advanced Tab:
3)Click on Environment Variables:
4) Click on New Tab of User Variables:
5) Write Path in Variable Name:
6) Now You need to paste the path of the Bin folder in variable Name:
8)Now Click on Ok Button:
1) To develop a java program the path required to be set for using tools such as Javac,Java
2) All the Tools available in the JDK/bin directory if you save java source file directly in this directory then setting path is not required because all the tools available in that directory.
3)In case if you want save the java source file outside of the Jdk/bin directory then set the path is required.
There are Two ways to set Java Path:
a) Temporary
b) Permanent
The steps to set java path in Windows:
To set Temporary path of Jdk, we must fallow the below steps
a) Open Command Prompt
b) copy the path of jdk/bin directory
c) Then write in the Command Promot set path=copied_path
For Example:
set path=C:\Program Files\Java\jdk1.6.0_23\bin
Here are The Steps for setting the permanent path of JDK.
Go to MyComputer properties -> advanced tab -> environment variables -> new tab of user variable -> write path in variable name -> write path of bin folder in variable value -> ok -> ok -> ok
2) Click On Advanced Tab:
3)Click on Environment Variables:
4) Click on New Tab of User Variables:
5) Write Path in Variable Name:
6) Now You need to paste the path of the Bin folder in variable Name:
8)Now Click on Ok Button:
Now you can run any Java Program on your System. We done permanent path setting.
Read also : What is Class and Object in java With Examples
No comments:
Post a Comment