Friday, March 15, 2019

How to set path in Java

The path is required to be set for using tools such as javac, java, etc.
However, if you have your Java file outside the JDK/bin folder, it is necessary to set the path of JDK.


There are two ways to set the path in Java:  

  1. Temporary
  2. Permanent
1) How to set the Temporary Path of JDK in Windows

  • Open the command prompt
  • Copy the path of the JDK/bin directory
  • Write in command prompt: set path=copied_path

For Example:

set path=C:\Program Files\Java\jdk1.6.0_23\bin








No comments:

Post a Comment