Error: could not open `E:\smallUtil\jdk8\lib\amd64\jvm.cfg' encountered when installing JDK

After installation, enter the cmd command:

java -version
E:\smallUtil\jdk8\lib\amd64\jvm.cfg

1. First of all, it is necessary to rule out that there is no problem in the way of configuring the environment in the environment variable, and then try my solution.

2. My solution is: find the following directory and delete the following files on the C drive:

  c:/windows/system32/java.ex
  c:/windows/system32/javaw.exe
  c:/windows/system32/javaws.exe

After deleting, this problem will not occur.

Extra article: Originally, the computer was installed with jdk19, because some plug-ins used in the project have restrictions on jdk. The plug-ins on my side only support jdk8 to jdk11, so I uninstalled jdk19. At the beginning, it was also because of jdk19 The existence affected my installation of jdk (the conclusion I got after trying several times myself) and then I went to uninstall jdk19 in the application and program, and found that the uninstallation was not clean (unclean has an impact on the installation of other jdk versions), Then I used the CCleaner tool to complete the uninstallation of jdk19. This tool deletes the registry, analyzes the computer storage, and other functions. It is very portable and observable.

Guess you like

Origin blog.csdn.net/ShiXinXin_Harbour/article/details/129100839