Was gonna say the exact same thing. Getting Java installed is always a bit of a headache but that's really the only hard part. Once your JVM is good, everything from there is easy.
And even the JVM part, it's not HARD, just annoying.
Even on Windows it can be a hassle because so many links will send you to Java 8 which Minecraft won't run on. Even the official links on minecraft.net sent you to the version that wouldn't run Minecraft for some time.
I wouldn't recommend doing it for mc. They keep changing and or using old jvms. What I do is I just go on oracles site and get the jdk they list that works, and run it directly from the folder. Also some distros do make it a pain lol.
I haven't done this in forever, but last time the recommended OpenJDK answer was somehow not right. Got the Oracle one, had to figure out where you extract the tarball to, fix my
PATH, yada yada.
That sounds fine though. The PATH variable is a nicety for the user to not need to type long paths, really like using ~ for the home directory, not for program setup.
I'm not sure if you've tried it or not, but sdkman.io is a really handy JVM ecosystem environment manager that makes getting Java (and other JVM langs) really easy to install and switch between.
And even the JVM part, it's not HARD, just annoying.