Home >Java >Javagetting Started >How to check the java (jdk) installation path in windows or linux system
Check the JDK installation path under Windows
First use the command line to check whether the JDK is installed:
java -version
(Note - there is a space in front)
Method 1:
Command line input:
set java_home
Recommended video tutorials: java learning
Method 2:
Command line input:
echo %java_home%
Check the JDK installation path under Linux
First check whether the JDK is installed in the terminal:
java -version
Next:
echo $JAVA_HOME
Recommended java related articles and tutorials: Introduction to java language
The above is the detailed content of How to check the java (jdk) installation path in windows or linux system. For more information, please follow other related articles on the PHP Chinese website!