Im fairly new to developing using the java ecosystem of tools, but i have never experienced a language ecosystem that involves as much installation effort.
My goal is to create a pico cli following this article. As I usually develop on dedicated virtual machines over ssh to avoid version conflicts, I set up a 22.04 vm with openjdk and gradle. Initially i tried to use apt to install openjdk and gradle. At this point i realized that there are no options (at least I found none) other than:
sudo apt-get update
sudo apt-get install openjdk-7-jdk
sudo apt-get install openjdk-8-jdk
sudo apt-get install default-jdk # version 11 currently
sudo apt-get install gradle # version 4 currently
sudo snap install gradle # permission error and version 7.2
Apperently i require the latest jdk and gradle version as I get a similar error during Graal native compilation.
At this point I started wondering, why there is no standardized way to install the latest stable versions (openjdk 19+ and gradle 7.51+) using only package managers.
Im perfectly aware, that its possible to install these tools by downloading the binaries manually and extracting them to your system. This however is more time consuming and annoying whenever you want to change your current version.
Now my question is: Am I missing something or is this the current state of ubuntu package managers? Is there a better alternative (package manger/different jdk/different distro ) to setup a modern java development environment?