The first case: first win+R, enter cmd to open the command line window, enter javac, and check if there is any problem
The normal situation should be like this
If not, reconfigure your environment variables
The second case: find the bin folder under the jdk directory, open it with javaw inside (can be set as the default opening method), if it cannot be opened, use the command line window again, win+r, enter cmd, and enter the command line window Then enter regedit to open the registry and enter the path as shown below
Then modify the thing on the right, as shown in the figure below.
The third case: the memory of the virtual machine is not enough, and the general case of insufficient memory is rare, just add an environment variable
But the virtual machine cannot be started, there may be many problems, I solved it with a repair software
The link is as follows