I get an error when starting MacOS Mojave STS and it doesn't start at all! !! Summarize the processing that was sometimes performed! !!
No java virtual machine was not found after...
When I try to start STS, the above message is displayed and it does not start. In general, it seems that it will start if the following 3 points are implemented ...
This article may be helpful for the above points.
Learn the meaning of "passing the PATH" by building a Java development environment on Mac
In my case, setting the above three points did not improve, so I started over from a clean state and it worked. The procedure is as follows.
I didn't know what was the cause, so I decided to start over from 0. When I checked the inside of the Mac, 3 java (all JDK?) Were included, so first uninstall all.
/Library/Java/JavaVirtualMachines
Since there is a java file under it, move the directory in the terminal and check the version. In my case, there were three.
Delete files one by one with the following command
$ sudo rm -rf /Library/Java/JavaVirtualMachines/jdk name
Check the jdk version below Virtual Machines in your own terminal and execute the delete command.
PATH JAVA_HOME Since I had set the above two variables, I deleted both of them. Click here for the delete command.
$ unset hogehoge....
Substitute what you want to delete in the hogehoge part. However,
```$ unset path```
Note that if you enter, you will not even be able to cd in the terminal. I think there are multiple PATHs, but they are separated by a colon (:). Let's delete only the PATH related to java.
Also, I added the above two points to the bash file, so I deleted them as well.
# Step 3 Uninstall STS as well
This is also deleted. This is recommended if you want to uninstall the app on your Mac.
[App Cleaner](https://appcleaner.softonic.jp/mac)
# Step 4 Reinstall jdk and STS
Download and install amazon-coretto-8.jdk from the amazon page. Then download and install STS again
After executing up to this point and confirming the startup of STS, it started up safely.
STS starts up even if the environment variable is not set ... Then ...!? (Guon !!)
The detailed cause is unknown, but it may have been wrong to put multiple java (jdk?) ... So if you are in the same situation, Oraoraaaa! !! Try removing all and jdk before trying.
Recommended Posts