2.0.15 asking for java installation - SOLVED (sort of)

Post Reply
josephbottinger
Posts: 35
Joined: Tue Oct 29, 2019 4:03 pm

2.0.15 asking for java installation - SOLVED (sort of)

Post 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?
Last edited by josephbottinger on Sun Jul 12, 2020 3:14 pm, edited 1 time in total.
Cherry Garcia
Site Admin
Posts: 293
Joined: Fri Aug 31, 2018 2:57 am

Re: 2.0.15 asking for java installation

Post 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 8635 times
josephbottinger
Posts: 35
Joined: Tue Oct 29, 2019 4:03 pm

Re: 2.0.15 asking for java installation

Post 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.
CherryRuss
Posts: 27
Joined: Sat Oct 20, 2018 9:29 pm

Re: 2.0.15 asking for java installation

Post 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.
josephbottinger
Posts: 35
Joined: Tue Oct 29, 2019 4:03 pm

Re: 2.0.15 asking for java installation

Post 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.
josephbottinger
Posts: 35
Joined: Tue Oct 29, 2019 4:03 pm

Re: 2.0.15 asking for java installation (2.0.17 otoo)

Post 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.
josephbottinger
Posts: 35
Joined: Tue Oct 29, 2019 4:03 pm

Re: 2.0.15 asking for java installation

Post 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.
Attachments
Screenshot 2020-07-11 08.10.52.png
Screenshot 2020-07-11 08.10.52.png (538.93 KiB) Viewed 8354 times
josephbottinger
Posts: 35
Joined: Tue Oct 29, 2019 4:03 pm

Re: 2.0.15 asking for java installation

Post by josephbottinger »

Crikey. It only accepted the one screenshot. Here's the other:
Attachments
Screen Shot 2020-07-11 at 8.12.11 AM.png
Screen Shot 2020-07-11 at 8.12.11 AM.png (313.38 KiB) Viewed 8354 times
josephbottinger
Posts: 35
Joined: Tue Oct 29, 2019 4:03 pm

Re: 2.0.15 asking for java installation - SOLVED

Post 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.
johnykordy
Posts: 1
Joined: Fri Jan 08, 2021 1:56 pm

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

Post by johnykordy »

worked for me thank you
Post Reply

Return to “Module Designer”