JDKMissionControl / jmc

This mirror is deprecated - please start using https://github.com/openjdk/jmc
197 stars 46 forks source link

Detect JVM installed #8

Closed jabrena closed 5 years ago

jabrena commented 5 years ago

Hi,

I am testing latest JMC EA build 103 in OSX: https://builds.shipilev.net/jmc/

executing the application, I receive the following error message:

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Jmc.
No Java virtual machine was found after searching the following locations:
../jdk/Contents/Home/bin

In the computer, I am using SDK to manage multiple JDK:

which java
/Users/jabrena/.sdkman/candidates/java/current/bin/java

and configured JAVA_HOME with the following value:

echo $JAVA_HOME
/Users/jabrena/.sdkman/candidates/java/current/

How to solve the issue?

Many thanks in advance

Juan Antonio

thegreystone commented 5 years ago

A simple workaround is to start it with the -vm flag (as per the readme). A more persistent solution is to edit the jmc.ini and add a -vm section, just like you would to the eclipse.ini.

Normally JMC EAs were built using an embedded JDK. We should probably no longer assume that this is the standard behaviour and just use the java we find on the path.

klaraward commented 5 years ago

You can also try removing the "-vm" line and the "../jdk/Contents/Home/bin" line from the jmc.ini, then it should use whatever java you have on the path.

// Klara

On 2019-05-01 21:56, Marcus Hirt wrote:

A simple workaround is to start it with the -vm flag (as per the readme). A more persistent solution is to edit the jmc.ini and add a -vm section, just like you would to the eclipse.ini.

Normally JMC EAs were built using an embedded JDK. We should probably no longer assume that this is the standard behaviour and just use the java we find on the path.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JDKMissionControl/jmc/issues/8#issuecomment-488396601, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMSPBJGDTDVN67XWWWY3MDPTHYYDANCNFSM4HJUIXDA.

thegreystone commented 5 years ago

Since https://bugs.openjdk.java.net/browse/JMC-6470, JMC will now use whatever JVM is on the path by default. I'm closing this issue.

jabrena commented 5 years ago

Upgrading the -vm with the path for sdkman, I could run jmc.

Many thanks for the support.

Cheers