Home  >  Article  >  Java  >  What should I do if I cannot view java_version?

What should I do if I cannot view java_version?

coldplay.xixi
coldplay.xixiOriginal
2020-07-06 09:11:4515186browse

The solution to the problem that java_version cannot be viewed: First click [My Computer-Properties-Advanced-Environment Variables]; then query "JAVA_HOME" in "New System Variables"; then in the "System Variables" option Check the PATH variable and CLASSPATH variable; finally enter "JAVAC".

What should I do if I cannot view java_version?

Solution to the problem that java_version cannot be viewed:

1. Right-click [My Computer] ---[ Properties]-----[Advanced]---[Environment Variables].

What should I do if I cannot view java_version?

2. Select [New System Variable]--the "New System Variable" dialog box will pop up, enter "JAVA_HOME" in the "Variable Name" text box, and enter "JAVA_HOME" in the "Variable Value" "Enter the JDK installation path in the text box (that is, the folder path in step 5), and click the "OK" button.

What should I do if I cannot view java_version?

3. Check the PATH variable in the "System Variables" option area. If it does not exist, create a new variable PATH. Otherwise, select the variable and click the "Edit" button.

Add "%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;" or directly "%JAVA_HOME%\bin;" at the beginning of the "Variable Value" text box, and click the OK button .

What should I do if I cannot view java_version?

4. Check the CLASSPATH variable in the "System Variables" option area. If it does not exist, create a new variable CLASSPATH. Otherwise, select the variable and click the "Edit" button.

Add ".;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;" at the beginning of the "Variable Value" text box.

What should I do if I cannot view java_version?

#5. Now test whether the environment variable configuration is successful or not. Enter "JAVAC" in the DOS command line window. If the help information is output, the configuration is correct. As shown in the picture:

What should I do if I cannot view java_version?

Related learning recommendations: Java video tutorial

The above is the detailed content of What should I do if I cannot view java_version?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:How does springmvc work?Next article:How does springmvc work?