Page 1 of 1

2.0.15 asking for java installation - SOLVED (sort of)

Posted: Fri May 22, 2020 1:23 pm
by josephbottinger
I just installed the new 2.0.15 MD. On startup, it says that it wants me to install a JVM.

I have *plenty* of JVMs. javac -version on the terminal works *perfectly*. I can switch JVMs all you like, actually. However, I don't know that it's using the *right* JVM, but the problem is that I have no visibility into this.

I'm using SDKMan; could MD use JAVA_HOME instead of ... whatever it's using, to find the JVM? Pretty please?

Re: 2.0.15 asking for java installation

Posted: Fri May 22, 2020 4:20 pm
by Cherry Garcia
Joseph,

Have you tried setting the jdk location explicitly in the preferences?
jdk-prefs.png
jdk-prefs.png (68.48 KiB) Viewed 6810 times

Re: 2.0.15 asking for java installation

Posted: Fri May 22, 2020 5:48 pm
by josephbottinger
Yes, I have. I tried the location of the JVM (the value of JAVA_HOME, such that "$JAVA_HOME/bin/java -version" gives me the version) and the directory that contains the "java" executable itself; after setting it, I exited the Module Designer and restarted; same results. The log file shows it requesting the java version but not the command line it's trying to run.

Re: 2.0.15 asking for java installation

Posted: Fri May 22, 2020 9:23 pm
by CherryRuss
Hi Joseph.

If there's no custom JDK path in the preferences, the module designer will just rely on the OS to resolve the path to java, javac, etc.

If you specify a custom path, it should use that. However, there was a bug with retrieving the custom path when checking Java versions at startup. It'll be fixed in the next release.

Re: 2.0.15 asking for java installation

Posted: Fri May 22, 2020 9:49 pm
by josephbottinger
Well, if I have any request here, it would be that you dump the locations you're checking into the system logs, so I can at least see what it's TRYING to do, too.

Re: 2.0.15 asking for java installation (2.0.17 otoo)

Posted: Mon Jun 01, 2020 10:06 pm
by josephbottinger
I just installed 2.0.17 and it's STILL not loading java properly from my specified location. The log shows nothing relevant that tells me why. It has the preference set to point to a Java 11 SDK (installed via SDKMan, so it's openJDK) and it won't build.

Re: 2.0.15 asking for java installation

Posted: Sat Jul 11, 2020 12:38 pm
by josephbottinger
STILL having the problem. Installed 2.0.17 this morning. On initial startup, I see the "To use the "java" command-line tool..." as shown in the 08.36.39 image attached. (When I tried to place multiple images inline the post got screwed up somehow and I couldn't figure out how to fix it.)

Selecting "More Info" goes to: https://get.adobe.com/flashplayer/ ... which... uh... no.

I have my preferences set to a working JVM, as shown in the other attached screenshot. This is a JVM I use *all the time* for work; it's not a "I tried to install the java and this is what sort of happened, does it work?" installation.

That is, however, located in ~.sdkman; the way I located it is via a symlink in the tool, and VMD is resolving it to the actual directory for the preferences. I've tried setting it specifically to use the symlink, but it goes back to the actual filesystem location.

The logs show me nothing that the screen doesn't. I can't attach the log file here (invalid attachment extension) so here's the relevant bit of the log as far as I can tell:

Code: Select all

08:15:09.588 Requested java version via command <java -version>
08:15:09.672 Requested jdb version via command <jdb -version>
08:15:09.755 Requested javac version via command <javac -version>
08:15:10.040 Catalog:actionListenerCallback -> verifying_login
08:15:10.040 MIActionmsg: verifying_login
08:15:10.040 Catalog:actionListenerCallback -> refreshing_from_server
08:15:10.040 MIActionmsg: refreshing_from_server
08:15:10.041 Catalog:actionListenerCallback -> logged_in
08:15:10.041 MIActionmsg: logged_in
08:15:10.041 Catalog:actionListenerCallback -> got_user_info
08:15:10.041 MIActionmsg: got_user_info
08:15:10.116 Output: No Java runtime present, requesting install.
08:15:10.116 Output: No Java runtime present, requesting install.
08:15:10.116 Output: No Java runtime present, requesting install.
08:15:13.865 Catalog:actionListenerCallback -> user_getProducts
08:15:13.866 MIActionmsg: user_getProducts
08:15:13.916 Get User products Status Code = 200
08:15:13.922 Actions remaining => getCatalog,getReviews,getCart,getNotifications
Note that

Code: Select all

/usr/libexec/java_home
reports that no JVM is installed; I've filed a bug against SDKMan because of this (because it's the "default place" to look for a JVM on OSX.) However, I *specifically* set the JVM location in the preferences as shown in the preferences screenshot, so the libexec issue shouldn't be a factor here.

Re: 2.0.15 asking for java installation

Posted: Sat Jul 11, 2020 12:41 pm
by josephbottinger
Crikey. It only accepted the one screenshot. Here's the other:

Re: 2.0.15 asking for java installation - SOLVED

Posted: Sat Jul 11, 2020 2:28 pm
by josephbottinger
Okay, I worked through it. It's not.. .difficult, just annoying.

The answer is to install an AdoptOpenJDK build (or similar) to the OS level, as opposed to at the user level; you can do so through a JVM downloaded from https://adoptopenjdk.net/releases.html? ... nt=hotspot . This installed a proper system-level JVM, and /usr/libexec/javahome reports it as a JVM; VMD loaded it fine (despite still having the custom JVM location set, which I think is still a bug) and stopped reporting an error.

Re: 2.0.15 asking for java installation - SOLVED (sort of)

Posted: Fri Jan 08, 2021 2:03 pm
by johnykordy
worked for me thank you