Java tooling in 2026:

"Install JDK 21."
"Actually keep JDK 26."
"Also set JAVA_HOME to something."
"Gradle will ignore it unless it won't."

Jeez, I just wanted to compile an app not perform an ancient ritual.

In all seriousness, how hard can it be to compile Gadgetbridge?! Their docs refer to an sdkmanager that just crashes on start up and the Docker image they point to has been out-of-date for about 8 years now.

How do people work like that 😕

"The SDK directory is not writable (/opt/android-sdk)"

Well I sure hope it's not. Are you suggesting you need this to be writable to compile a simple app?!

@fribbledom Well no, but actually ... yes
@fribbledom This is mostly Android stuff, my own Java experiences outside of Android are great...

@gudenau

Agreed, I'm being a bit unfair to Java itself, even though it plays a major role in all the issues I'm facing.

@fribbledom Once enterprise touches Java, it turns to a mess...
@fribbledom Updated documentation? Pfff, we don't need that.
@fribbledom you missed burning an ogre's toenail
@fribbledom ah yes, be prepared to sacrifice another black rooster when there's a Gradle update 🙄
@fribbledom never set and export JAVA_HOME globally, that's an ancient JDK 1.1 curse. Never add a jre to a system or user PATH for a non-OS package or development environment, leave that to the OS to manage for OS packages. Set PATH and JAVA_HOME locally within scriots, if necessary.
@fribbledom And everything official tells you to use Oracle. NEVER. Use OpenJDK.

@fribbledom
Setting up the build environment is 80% of the projects effort and we still, after decades, have not come up with a good and standardized way of preserving that within the actual repo.

dockerfiles (if build on top of a vanilla base image) are actually a way in the right direction. (Not because of docker itself, but because they explain the setup)

@fribbledom I'd strongly recommend installing Java using a package manager or using SDKMAN, so that you don't need to touch the PATH variable or any environment variables.

For example, Azul provide their JDK through an APT repo: https://docs.azul.com/core/install/linux-ca-deb#install-from-azul-apt-repository

With SDKMAN, you can install several JDKs (and each one in different versions) and manage which one is used by default. It also allows you to install Maven similarly: https://sdkman.io

Installing Azul Zulu CA DEB-Packages on Linux

docs.azul.com