BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Introducing JDKMon: a New Tool to Detect and Update JDKs

Introducing JDKMon: a New Tool to Detect and Update JDKs

This item in japanese

Lire ce contenu en français

Bookmarks

Gerrit Grunwald, principal engineer at Azul, has introduced a new tool, JDKMon, that monitors and updates installed JDKs as an alternative to existing package management systems such as SDKMAN!, Homebrew and Chocolatey. With the many available JDK distributions nowadays, keeping several of them up-to-date on a user’s machine can be a challenge. JDKMon displays the installed JDK distributions that include buttons to download the latest version for each distribution.

The tool detects JDK distributions in the default directory for each operating system: C:\Program Files\Java\ in Windows; /System/Volumes/Data/Library/Java/JavaVirtualMachines/ in MacOS; and /usr/lib/jvm in Linux.

Consider the situation in the screenshot below in which there are no JDK distributions installed in the default Windows directory:

Right clicking in the tool provides options to either rescan the default directory, to add other directories to the search path, or to revert to the default search path. The latest updates are automatically retrieved every three hours with the option to manually rescan. Every folder of the search path is stored in the jdkmon.properties file in the user’s home folder.

JDKMon displays the search path with the corresponding directories. Every JDK distribution found in the search path is shown and lists the current version along with the latest available version. For every distribution, there are one or more buttons to select an available package type for download.

Some distributions aren’t available for direct download due to license requirements. In that case, JDKMon will render the download buttons as disabled. The text, (FX), is displayed next to the distribution name when it includes JavaFX and the information icon (i) is displayed instead of a version number if there are available alternative distributions. After clicking one of the package type buttons, the user is presented with a dialog box to select the download location. A progress bar is displayed when the download has started. After the download has completed, the package may then be manually installed.

For each release, JDKMon offers installers for Windows, MacOS and Linux. It’s also possible to run the platform-specific JAR files on JDK 16 with the command:

java -jar --enable-preview JDKMon-16.0.jar.

JDKMon retrieves information about the latest JDK versions from the DiscoAPI, a general purpose API to discover builds of OpenJDK from various distributions. At the moment, the following distributions are supported by JDKMon: AdoptOpenJDK, AdoptOpenJDK OpenJ9, Corretto, Dragonwell, GraalVM CE, JetBrains, Liberica, Liberica Native, Mandrel, Microsoft, OJDKBuild, OpenLogic, Oracle, Oracle OpenJDK, Red Hat, SAP Machine, Temurin, Trava, Zulu and Zulu Prime.

JDKMon is written in JavaFX and uses the FXTrayIcon library which allows it to run the application in the system tray of Windows and MacOS. The system tray feature, however, doesn’t work on all Linux distributions. In that case, the application is available through the dock.

JDKMon is a full GUI application with no command-line interface. This is in contrast to SDKMAN! and Homebrew that are command-line only. Chocolatey, on the other hand, provides both a GUI and a command-line interface.

Rate this Article

Adoption
Style

BT