Home  >  Article  >  Java  >  How to configure Java environment variables in Windows

How to configure Java environment variables in Windows

PHPz
PHPzforward
2023-05-02 14:22:065017browse

1. Configure the JAVA_HOME environment variable

  • Variable name: JAVA_HOME

  • Variable value: C :\Program Files\Java\jdk1.8.0_311

2. Configure the Path environment variable

  • Variable name: Path

  • Variable value: %JAVA_HOME%\bin or C:\Program Files\Java\jdk1. 8.0_311\bin

3.Verification

>java -version
java version "1.8.0_311"
Java(TM) SE Runtime Environment (build 1.8.0_311-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.311-b11, mixed mode)
 
>javac -version
javac 1.8.0_311
 
>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.8.0_311\bin

The above is the detailed content of How to configure Java environment variables in Windows. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete
Previous article:How to use trim in JavaNext article:How to use trim in Java