elibraryportal Logo

How to Set Path in Java

There are two way to set the path in Java that is...

  1. Temporary
  2. Permanent

1) Temporary Path set in java

There are following steps

  1. First Install JDK(java) Software then.
  2. Go in C:\ Drive open the Program Files
  3. Then Open java folder, again open jdk1.8.0_181 folder
  4. Open bin folder, Copy the path like that (C:\Program Files\Java\jdk1.8.0_181\bin)
  5. Open the command prompt type here set path= Paste here


Temporary Path set in java

2) Permanent Set Path :

There are following Steps :

Go to MyComputer properties ->Click on advanced tab ->Click environment variables ->Click on new tab of user variable -> write path in variable name ->Paste jdk bin in variable value -> ok -> ok -> ok

1) Go to MyComputer properties

Permanent Set Path

2) Click on the Advanced System Setting tab

Permanent Set Path

3) Click on Environment Variable

Permanent Set Path

4) Click on the New tab of user variables

Permanent Set Path

5) Write the path in the variable name and Paste path of bin folder in the variable value.

Permanent Set Path
Permanent Set Path

6) Just type on command Prompt javac test your jdk in computer.

Permanent Set Path