#There are two ways to set the path in java, one is the temporary path and the other is the permanent path.
Set the temporary path
- Open the command prompt in Windows
- Copy the path to the jdk/bin directory where java is located (C:\Program Files\Java\jdk_version \bin)
- Write in the command prompt: SET PATH=C:\Program Files\Java\jdk_version\bin and press Enter command.
Set Permanent Path
- Go to My Computer ---> Right click on it ---> Advanced System Settings ---> Advanced Tab ---> Click on Environment Variables
- Click on the new tab of User Variables and assign the value JAVA_HOME to the variable name
- java\jdk_version\bin path (copied path) to the variable value and click the OK button
- Finally, click the OK button.
The above is the detailed content of How to set temporary path and permanent path in Java?. For more information, please follow other related articles on the PHP Chinese website!