0

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?

  • https://askubuntu.com/questions/274275/why-ubuntu-software-center-doesnt-have-the-latest-version-of-softwares read the answer to this question it will tell you what you are asking. – David Nov 02 '22 at 06:55

1 Answers1

0

Thanks to David i found these openjdk and gradle ppa repositories. They contain almost all versions i require.

Using ppas seems to be the right way to install latest package versions using apt only.

Edit

I found an alternative called sdkman!. It simplifies the process of installing latest sdks by providing a simple syntax:

sdk install java
sdk install gradle
  • Just remember that you are responsible for the security of apps installed by ppa. Ubuntu does not do security patches for them. – David Nov 02 '22 at 10:01