I also was confused - but it's simpler than you think! I followed the instructions here: https://www.selikoff.net/2018/05/13/how-to-install-open-jdk-...
sudo mv jdk-11.jdk /Library/Java/JavaVirtualMachinesI use sdkman to manage my java versions on osx . It is similar to rvm or nvm. https://sdkman.io
Re:Java 11 released
by core-questions on Tuesday September 25, 2018 @05:00PM
(#18070434)
Get Homebrew installed - https://discourse.brew.sh/t/how-to-install-openjdk-with-brew...
Re:Java 11 released
by oftenwrong on Tuesday September 25, 2018 @03:41PM
(#18069794)
You might be able to make an installer package from it with pkgutil. You can use the Contents/Home directory from the tarball as your JAVA_HOME; no need to do an installation.
Others have already commented but:
1. tar zxf openjdk-11+28_osx-x64_bin.tar.gz
2. sudo mv jdk-11.jdk/ /Library/Java/JavaVirtualMachines/
3. Done!
If you're using homebrew then 'brew cask install java' should work once this PR is merged:
https://github.com/Homebrew/homebrew-cask/pull/52448
I am, I'll wait for that.
Edit: Apparently I won't! This isn't ideal.
Just noticed that the thread was about OpenJDK, for which there is no cask at the moment. The java cask is the Oracle JDK.
https://github.com/AdoptOpenJDK/homebrew-openjdk
Thought they don't (yet) have openjdk11.
There's also some problems with making (at least) the openjdk8 build appear in the usual places, see https://github.com/AdoptOpenJDK/homebrew-openjdk/issues/9 for how to do it manually.
I only found a targz download link, didn't understand the contents of it - it looks like the inside of a macOS application package. The installation instructions refer to it being for .dmg file, which it doesn't seem to be.