Live data from Hacker News

AdoptOpenJDK: Open-source, prebuilt OpenJDK binaries

adoptopenjdk.net

41–50 of 91 posts

Re: AdoptOpenJDK: Open-source, prebuilt OpenJDK binaries

#41
post #40

I assume this is mostly for windows? All Linux and I assume Mac has openjdk available in the repos. The openjdk project itself also hosts binaries for *Nix

It can be helpful to just pull binaries from AdoptOpenJDK when you know you want a very specific version.

System packages shift around minor versions which is fine 99% of the time (given Java's compatibility especially). I've occasionally needed to work around a bug in a specific version.

Re: AdoptOpenJDK: Open-source, prebuilt OpenJDK binaries

#43

You don't need extra projects to manage this stuff anymore. There is a great answer here... https://stackoverflow.com/questions/52524112/how-do-i-instal... brew install java (12) brew install java11 And you can simplify things... In your .bashrc: export JDK_HOME=`/usr/libexec/java_home -v 12` # v9+ change to the version you installed export JAVA_PATH=$JDK_HOME export JAVA_HOME=$JDK_HOME export PATH="." export PATH="$…

I'm a big fan of SDKMan for handling my Java/Kotlin/Gradle releases. It works across all the major platforms. Homebrew is great on macOS, but kinda non-existent on other platforms.

I use it together with jenv so I can switch between versions easily. Jenv does not allow you to install versions. Sdkman makes it hard to switch between versions but together they solve the problem.

Re: AdoptOpenJDK: Open-source, prebuilt OpenJDK binaries

#44

Please add an option for JRE in the browser - JRE compiled to JavaScript or WASM (like CheerpJ or TeaVM).

Seems maybe strange to run a JIT on a JIT. There are some smaller JVMs that likely wouldn't need to be that different, but running HotSpot on WASM, particularly in the browser, seems strange.

Why not compile your classes to WASM instead?

Re: AdoptOpenJDK: Open-source, prebuilt OpenJDK binaries

#46

You don't need extra projects to manage this stuff anymore. There is a great answer here... https://stackoverflow.com/questions/52524112/how-do-i-instal... brew install java (12) brew install java11 And you can simplify things... In your .bashrc: export JDK_HOME=`/usr/libexec/java_home -v 12` # v9+ change to the version you installed export JAVA_PATH=$JDK_HOME export JAVA_HOME=$JDK_HOME export PATH="." export PATH="$…

Homebrew is only useful for macOS users though sadly.

Homebrew will work on Linux and the Windows Subsystem for Linux as well. I'm not sure how well it works there, though, as I've only used it on macOS.

https://docs.brew.sh/Homebrew-on-Linux

Re: AdoptOpenJDK: Open-source, prebuilt OpenJDK binaries

#48
post #36
post #26

Earlier quoted context omitted.

At least the MacOS binaries from Oracle are not packaged in a user-friendly manner. You just get a zip file containing JAVA_HOME, and it's up to the user to know what to do with this. Apple requires you to copy this to a very specific, deeply nested, hidden system directory. That's definitely not something I could ask an end user to deal with. After the bait and switch with the licensing for the original Java distrib…

The JDK requires no installation, and the concept of a "desktop system JRE" is no longer recommended; in fact, a JRE is no longer shipped. The recommended practice is for developers to bundle a custom, minimized version of the runtime with their application (using jlink). End users shouldn't install any Java runtime anymore. > After the bait and switch with the licensing for the original Java distribution The product…

I know desktop system JRE's aren't recommended any more, but there's still plenty of apps out there that require them. I literally ran into this last week.

I am glad to hear the toolbar on the JRE is gone, and I'm glad there's a prominent notice on the download pages - but there's effectively no free official standalone JRE for commercial use anymore.

Re: AdoptOpenJDK: Open-source, prebuilt OpenJDK binaries

#49
post #26

Earlier quoted context omitted.

At least the MacOS binaries from Oracle are not packaged in a user-friendly manner. You just get a zip file containing JAVA_HOME, and it's up to the user to know what to do with this. Apple requires you to copy this to a very specific, deeply nested, hidden system directory. That's definitely not something I could ask an end user to deal with. After the bait and switch with the licensing for the original Java distrib…

> it's up to the user to know what to do with this Why are you asking your end-users to manually install your development dependencies, though? It's called the J D K for a reason. Ship a linked version of your application. > Apple requires you to copy this to a very specific, deeply nested, hidden system directory. This just isn't true - you can run Java from anywhere. It's just a tarball containing the binaries. Un-…

> Why are you asking your end-users to manually install your development dependencies, though?

If you want to run a legacy desktop Java application (without bundled JRE - and yes, there's still plenty of these apps out there), MacOS will actually do the prompting for you.

And it takes you to the commercial JRE download page, which isn't something I'm willing to install. So the only reasonable option I could find as an end-user who wants a non license-encumbered JRE is to install OpenJDK.

> This just isn't true - you can run Java from anywhere. It's just a tarball containing the binaries. Un-tar and run the binaries like you would any other program. I never 'install' Java on macOS.

From the command line, of course that's true.

But if you double click on a .jar file from Finder, does MacOS find your JRE in a random directory? I was pretty sure that it doesn't do that.

Post reply on HN