HanSolo / JDKMon

A little tool written in JavaFX that monitors your installed JDK's and inform you about updates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature request] Detect the currently configured JDK in JAVA_HOME

ouryperd opened this issue · comments

If multiple JDK's are found, detect and display the currently configured JDK in JAVA_HOME.

Indeed a good idea...will see what's possible...

If JAVA_HOME can be found the currently used JDK will be marked with an '*' after the version number. This feature will come with release 16.0.10

Ok...it looks like it's harder than I thought. It works perfectly fine on Mac and Windows within the IDE but as soon as it is packaged as native app it does not work again. On Linux it does not work at all at the moment. So it will need further investigation...will reopen it...

It's really interesting, it even works fine as packaged app on MacOS when started via open JDKMon.app from the command line but when started using double-click it does not work and takes really long to start up.

So 16.0.11 partly supports getting the currently used JDK (on Windows and on Mac when started from the terminal). It doesn‘t work on Linux yet.

I think the definition of "currently active JDK" is more than just looking at JAVA_HOME.

For instance, if JDK A is defined in JAVA_HOME, but JDK B precedes all other JDKs in PATH, then we could argue that JDK B is currently active, at least for programs that only rely on the jdk/bin executables present in the system/user PATH.

More here: adoptium/installer#395