-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should Adoptium be producing Temurin JREs for releases beyond version 8? #2683
Comments
I think we should ideally give users some warning before deprecating something, however in principle I agree that not providing JREs for 11+ seems "reasonable" particularly if we give people a guide on how to do it themselves, however I think we should probably check with companies supporting the Adopt binaries before finalising such as decision. |
We are using AdoptOpenJDK Java 11 Docker JRE images and hope to switch to Java 17 JRE images once/if available. For us, they're a lot better than JDK's as they're a lot smaller. It's also easy to maintain as we can simply change the Docker image tag once a new minor/major version of Java is released. I've looked at jlink before, but it's less straightforward. If I look at for instance https://medium.com/azulsystems/using-jlink-to-build-java-runtimes-for-non-modular-applications-9568c5e70ef4 it's still some work to use, especially if the application doesn't use the module system. Instead of simply using the latest Docker image, we would have to create our own Docker image. Preferably one for each application to have them as small as possible. Then we would have to run the steps every time a new minor or major version of Java is released. Of course it's all possible and we might be able to automate some parts. But it's still a bigger effort then simply using a JRE. I'm afraid that if the JRE's are no longer available, then people will switch to a JDK or a JRE build from another vendor instead of jlink as it's easier and less maintenance. Also if I look at the number of downloads (see below) for some of the Chocolatey packages (Windows package manager) I maintain, then I see the JRE is still quite popular. adoptopenjdk 139288 Of course I don't know how much work it's to maintain the JRE's for Adoptium and if the number of downloads for the JRE are worth the effort. So it's just my 5 cents. |
Migration should be fairly straight forward since if image size doesn't matter, passing 'ALL-MODULE-PATH' to jlink will produce a ~105 MB large image with everything in it. I am sure adopt could post the list of modules somewhere which were used for the legacy JRE so that users could reproduce the same image if they want. In my experience, maintaining a module list is not very difficult (even for non-modularized projects), because it rarely ever changes. A server app doesn't suddenly start using a desktop module. One reason why its so easy is because you code against your custom runtime, and you test against it. If you are missing a module you will notice it right away and you can add it. Even if you would like to strip the custom runtime down to a minimum (again for a dusty app which isn't using java modules), it usually isn't very difficult either to get an initial list of modules. jdeps + some greping and you basically have 90% of what you need (i wrote a blog post about this). The contents of a JRE are not very well defined. For example you could argue that part of running Java 11+ is being able to run JEP 330 single-file source-sode programs. But for that you need javac which was never in legacy JREs. Although i don't think adopt should just stop releasing JREs for 11, maybe 17+ would be a good time for it if it isn't too late yet. |
With JRE builds from AdoptOpenJDK we have currently an easy way to produce compliant java docker base images on top of our infrastructure providers base image. While there's a way to build a similar runtime manually (e.g. https://justinmahar.github.io/easyjre/), I guess a lot of companies would have to do the same... |
We chose AdoptOpenJDK as the new Java option for our company and we provide both the JRE and JDK packages to quite a number of users. The reason we need the separate JRE is that the JDK is seen as a security risk on Production Servers. We also apply the Rule of Least Privilege to general non developer users and provide them with only the JRE. |
here is a quickly written dockerfile which builds a custom JRE out of the AdoptOpenJDK 11 docker image (only an example, don't copy the JRE into home)
|
I have a few Eclipse-RCP based apps that are packaged with the JRE (currently v11), so they can be installed/deployed very easily without any extra dwnloads for the user (And I can control the packaged version of Java too..). Using the already packaged JRE directly from AdopOpenJDK for this is extremely convenient. Replacing the embedded JRE with the JDK would add tenths of useless extra Mb to the final package Example app: JMSToolBox I guess there are also numerous Java apps (not only Eclipse-RCP apps) that package a JRE and not a JDK... |
Hello Temurin Community, |
Yes, this feature is used by many. If you handle many apps its an annoyance to setup automatic jlink and CI/CD for the custom JRE generation only to save tens of MB of space which does not bring enough benefits while adding additional complexity to the project/CI/CD. Also regular AdoptOpenJDK should have been providing JDK builds in parallel until Adoptium is fully online. Such a bad time to switch when there are new releases to be made. BTW AdoptOpenJDK page links some 11.0.12 builds to 11.0.11 files now, so bit of a mess there. |
adoptium/adoptium#64 - In short we'll start producing Java 11 and 16 JREs, but from 17 we're taking that toy away ;-). We'll naturally provide lots of guidance on what you should be doing with jlink going forward (you really will thank yourselves once it's done :-D. |
Quoting a message I sent to slack:
In my opinion, they’re not really directly related. The question should be:
I see a lot of mentions of |
Also to add some "What are others doing" narrative:
So from a culture perspective, it seems like this is fairly well accepted by the users. |
I was surprised that no one mentioned https://jlink.online/ (see https://github.com/AdoptOpenJDK/jlink.online/). Is the effort being continued at Adoptium? |
jlink.online is a great alternative of couse, other than for JDK8, and that would likely form part of our recommendations assuming we switch off production of JREs from JDK17 |
Thanks for sharing, I didn't know this existed however I still feel this is strongly off-topic, quoting:
Simply put, rarely would an "end-user" that wants a runtime uses an online services like this. This "release" topic is about downloadable runtimes. Custom runtimes are fantastic and useful service. Services which promises to automate this are a neat tool to have, but NOT one which I'd ever be directing users of a particular application towards. |
|
Regardless, it's a developer tool. As an example.... Let's say you're running a Minecraft server, one requirement is a pre-install Java Runtime, Microsoft doesn't offer one with the server version of the software. You're faced with the following decisions from Adopt's website currently:
... in the case of most Java applications, either path will result in a running Minecraft server. The moment you've introduced |
Zulu offers JRE's: https://www.azul.com/downloads/?package=jre BellSoft even offers 2 JRE's: Standard and Full. See for instance: |
Good catch. The default behavior of the downloads page is to apply a filter which filters them out (as well as the FX downloads, etc). |
With 100+ teams building JVM applications where I work, it is very nice to be able to offer a default JRE Docker image for running these applications in production (and a JDK image for building them on CI). I guess every team could build a custom JRE for their app's custom image using |
We use AdoptOpenJDK JRE image, and also hope that Adoptium can also provide JRE. |
One vote more for jre |
I personally use a JRE and know a lot of folks who use JREs as well. |
We used the AdoptOpenJDK JRE image of both Java 8 (for older applications) and 11 (for all newer applications). Please ensure for Adoptium to follow that tradition for both JRE and JDK as well. |
How is not providing JREs even being considered as a possibility? This is insanity. These are end users, they are not going to build their own customized JRE, nor are they going to tolerate hundreds of megabytes of JDK junk that they have no need for. Just exactly what is an end user supposed to do, in your imagined scenario, when they cannot easily find a JRE download link? I cannot believe this is even a question. If AdoptOpenJDK goes away without some replacement system in place for downloading a JRE then you have made the Java ecosystem measurably worse. |
I've been directing my users to download the JDK for two years. I've never had a complaint on download size, and we have clients all over the world and some on metered connections. The app is downloaded often directly by end-users, 41K downloads since may. I'm not advocating against it, but I wanted to share a story to the contrary, end users likely install what's asked and don't notice the difference, except for longer download times. We're moving away from the JDK and towards a |
I am a huge advocate of the deprecation of JRE packages. Here's why: The primary reason I observe people want to use JRE packages is so that they can have a Java runtime with the entire Java SE platform, but not the JDK tools, and to save storage and download time. I'd then define benefits as:
Meanwhile, with jlinked runtimes, developers get:
A jlinked runtime is, therefore, a better solution than a general-purpose JRE when we look at the criteria for why developers would prefer JRE over a JDK package. Of course, though, it is a lot easier and convenient to keep the status quo and continue to use general-purpose JREs instead of investing some time into And as @tresf mentioned:
But is the trade-off not beneficial enough? I do believe it is if we truly value the benefits of a smaller runtime. If developers don't value a smaller runtime with increased security, in exchange for a few months of work to automate It is also entirely possible to produce custom Java runtimes that are designed for a category of applications. Let's say your company only deploys Spring Boot apps, but you don't want to have a custom Note It is well known that Spring Framework has a dependency on Multi-Stage Build Containers with jlinkFor developers interested, here's how one can produce jlink runtimes without necessarily having to scan modules on every build, as long as you know which modules are required for your app. FROM adoptopenjdk/openjdk11:latest as jre-build
# Create a custom Java runtime
RUN $JAVA_HOME/bin/jlink \
--add-modules java.base \
--strip-debug \
--no-man-pages \
--no-header-files \
--compress=2 \
--output /javaruntime
# Define your base image. You may use any base OS and version of your choice.
FROM debian:buster-slim
ENV JAVA_HOME /usr/lib/jvm/openjdk-11-amd64
ENV PATH "${JAVA_HOME}/bin:${PATH}"
COPY --from=jre-build /javaruntime $JAVA_HOME
# Continue with your application deployment
RUN mkdir /opt/app
COPY japp.jar /opt/app
CMD ["java", "-jar", "/opt/app/japp.jar"] |
"Minimal Java runtime - needed for executing non GUI Java programs, using Hotspot JIT." Yet, it depends on If I am not mistaken, all the jre-headless package does is not include the more specific developer tools (e.g., |
First of all, let me clarify that I do not demand something here. Adoptium is an awesome project, having an alternative, non-commercial source for pre-compiled Java binaries is fantastic, whether it's JRE additionally provided or JDK only 🙂.
It is and should never be your responsibility if anything breaks because anyone uses your free binaries. Everyone who is able to build an own JRE, is or should be perfectly able to decide whether to build an on JRE or using a pre-compiled one. More importantly everyone should be able to decide when/whether to apply an update, read release notes before doing so blindly, running test environments if the production environment is more than a home application, etc. And lastly if someone breaks something by using/updating your pre-compiled JRE, then it is trivial for every individual user to reconsider whether to stay on an older version, use different builds, do own builds or whatever. But this is not your responsibility but the individual responsibility of the ones who use your builds. I am personally not thinking at all about users who are able to build their own Java, but I'm thinking about the private person who wants to run its own Airsonic, Komga, whatever home server for self-hosting and remotely access media on a private server (just an example), who simply downloads a Of course the JDK works just as fine, so it is mainly about reducing traffic and disk space.
Why thinking so complicated 😄? Of course you simply ship the same JRE that is included with the anyway compiled JDK, not more, not less, that is what everyone would expect form it. Basically the current JDK archive(s) could be taken, compiler and packaging binaries, development headers and jmod stuff removed, and viola 😄. No need to overthink whether it is sufficient or perfect for every case, as such does not exist and no one expects it either. I'm not sure about the definition of a "standard" JRE, but of course there is one, probably |
It is the project's fault if the end-users have no idea what Java is and the project does not document how to get Java installed. This falls under the charter of the project that depends on Java (e.g., Airsonic, Komga, etc). If there is no JRE available out there, or these projects don't want to produce a Java runtime by themselves for their own projects (and heck, simplify the life of the end-user so they don't have to know what Java is and how to install it), then at the very least these projects should instruct user on how to to have the JDK installed.
Now someone needs to maintain and be careful what is removed/included in every release (major and minor). There is a cost in software development to maintain the status quo.
As I said in previous comments, there is no definition of what constitutes a standard JRE, and most real-world Java applications wouldn't work with just
There is no "JRE" included in the JDK. There is only 'the JDK'. |
I didn't say that I'm talking about users who do not know what Java is, but users for whom it is not trivial to compile Java, respectively have no experience with building/compiling software in general, for whom the live would be easier if there was a pre-compiled Java (JRE) build to run their chosen Java software. It isn't a problem to install Java, if no specific version is required, or, thanks to Adoptium, the JDK is perfectly fine, even when development tools and headers are not required. It would be simply beneficial for traffic and disk space to have a simple way of downloading a specific JRE version, independently of the OS/distribution used. Adoptium could do this, just like AdoptOpenJDK did, but of course it is your choice and no one cam blame you for deciding against it.
How is this different for the JDK? You don't need to be additionally careful for JRE, just apply the same decisions for JRE that you apply for the JDK builds already, this is what I wanted to make clear. The JRE (runtime libraries and binary) which is in fact already packaged with the JDK archives is perfectly fine and I would be confused if the JRE would contain anything different.
The JDK contains the |
There are "JREs" provided by some vendors (Azul's Zulu, BellSoft's Liberica and SAP's SapMachine) ( #2683 (comment) ) |
On Debian Bullseye it's 353 MiB vs 150 MiB final disk space usage (with all dependencies). Trivial as the JDK pulls in the JRE as dependency and hence whatever decision was made for the JRE applies implicitly for the JDK and the other way round (when it's about the runtime libraries/executable only). |
Careful about the situation in Debian. |
Yes, the first as part of the runtime libraries, the jmod's for packing/embedding with Java application (hence development), if I'm not mistaken? The Temurin JDK downloads contain both likewise. |
Btw, Alpine's |
On Debian, On Alpine Linux, the JDK package is further split: https://pkgs.alpinelinux.org/package/edge/community/x86_64/openjdk17-jdk
|
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
In the discussion, folks seemed interested in use cases. Here's one I didn't see mentioned: I create a number of small Java utilities. (Some command-line, some Swing GUI.) I use launch4j to wrap them into a stand-alone This is nice because the wrapper will offer to download a JRE if they don't have one that meets a minimum spec. Since moving to Java 11 I set the download URL to point to AdoptOpenJDK. As long as they set the Oracle registry option, all works nicely & this is just a 1-time download. Would love to switch to Java 17 (for (Note: I also understand the desire for bundling specific JDKs: I'm happy if OpenJDK can move faster and break stuff - but not deployed apps. This is good! :-) It makes sense for our main large desktop app. Interestingly we download both the JRE and JDK then hack "jdk.unsupported.desktop" back into the JRE (for JavaFX support) to put in our installer. Why start with the JRE? This just turned out easier, plus we completely failed to get |
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
Hello, Do we have to backtrack? |
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
Just wanted to remind that if you are using a custom assembled Java runtime with |
That's another reason why we need the pre-built JREs from vendor that allow for automatic updates. In case another such a vulnerability is discovered in Java itself, I doubt that all that folks who assembled their own runtime only because there's no pre-built JRE available (and not because they really need a custom binary), will apply timely updates. Lots and lots of systems hacked, leaked sensitive data etc... 😭 |
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
Given the feedback we have received and the use cases described above we have now reverted the decision and have started to produce the Temurin JREs for JDK17 in the same manner as for previous releases as long as it remains technically feasible for the project to do so in the current form. For many simple use cases, using You can read more about this decision in @tellison's blog post at https://blog.adoptium.net/2021/12/eclipse-temurin-jres-are-back/ Thanks to everyone who has contributed to this issue in recent months :-) |
- Adoptium / Eclipse Temurin no longer produces JREs, unfortunately adoptium/temurin-build#2683 This means we need to download a JDK and produce a JRE for each platform - They recommend you use JLink to produce your own JREs https://blog.adoptium.net/2021/10/jlink-to-produce-own-runtime/ - It seems possible to do this cross-platform, use the Gradle Toolchain JVM with a JDK for target platform to produce JRE for target platform - This currently includes all modules and can be cut down further to use fewer modules, similar to that within the old AdoptOpenJDK JREs
We all agree that Temurin 8 should have both a JDK and JRE build available, but what about later versions?
With jlink being introduced alongside modularity, there is a new way to strip down the Java runtime to minimize the delivery in a way that specifically supports the application. Users can also jlink a 'general purpose' runtime environment for multiple applications to share.
AdoptOpenJDK produced JREs and JDKs based OpenJDK 11. Should Adoptium continue this for Temurin, or drop the concept of JREs beyond Temurin 8? This would be a regression for users of the AdoptOpenJDK JREs when moving to Temurin builds.
The text was updated successfully, but these errors were encountered: