Tag Archives: Java language

Error after JDK reassembly: Error:opening registry key ‘Software/JavaSoft/JRE’

1、 Problems arising

After the JDK is reinstalled, use Java – version to view it on the command line, and an error is reported Error:opening registry key ‘Software/JavaSoft/JRE’

The details are shown in the figure below:

Reason: the previous version of JDK was not unloaded completely

II. Solutions and steps

Step 1: uninstall the installed JDK (in the control panel)

(1) Windows + R, enter CMD, then enter control in the command line, press enter to open the control panel

(2) Click “uninstall program” in the control panel

(3) Find the JDK you installed, right-click it and click uninstall

Step 2: delete all javasoft files and their subdirectories in the registry

(1) Windows + R, enter regedit, and then click Yes to open the registry

(2) In the registry, press Ctrl + F to start the search function, enter javasoft in the search box, as shown in the figure below, and then click “find next”

Waiting to find

After the search is completed, it will be highlighted in the tree menu on the left (if it is not found, it will be ignored)

(3) Select the javasoft file, right-click, select the “delete” option in the pop-up menu, and click “yes” in the delete confirmation box

Step 3:

Add the java.exe , javaw.exe And javaws.exe The document was deleted

(you can search and delete it. If the file doesn’t exist, you don’t need to worry about it.)

Step 4: test whether JDK is completely unloaded successfully

Windows + R key, enter CMD, enter Java in the command line, press enter key, as shown in the figure below, indicating that JDK has been completely unloaded successfully

3、 Re install JDK

JDK installation tutorial: JDK download installation and environment configuration

After installing JDK and configuring environment variables

Windows + R key, enter CMD, enter Java – version in the command line, the JDK version information as shown in the figure below will appear, indicating that the JDK installation and configuration is successful

 

Error attaching to process

Use Jinfo command to check the error of remotemaven server (a process of idea)

Error attaching to process: sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 25.101-b13. Target VM is 25.152-b28
sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 25.101-b13. Target VM is 25.152-b28
        at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:435)
        at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:305)
        at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:140)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:185)
        at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
        at sun.jvm.hotspot.tools.JInfo.main(JInfo.java:138)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.tools.jinfo.JInfo.runTool(JInfo.java:108)
        at sun.tools.jinfo.JInfo.main(JInfo.java:76)
Caused by: sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 25.101-b13. Target VM is 25.152-b28
        at sun.jvm.hotspot.runtime.VM.checkVMVersion(VM.java:227)
        at sun.jvm.hotspot.runtime.VM.<init>(VM.java:294)
        at sun.jvm.hotspot.runtime.VM.initialize(VM.java:370)
        at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:431)
        ... 11 more

Solution:
the reason is that the JDK version does not match. Just change the JDK version of Maven in idea. The method is as follows

change the version here.