-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
JDK without JMODs #1198
Comments
Can this be related to JEP 493? |
Thanks for the quick support! Reading the other thread and the JEP, I assume it's expect that jlink should continue to work, just without the actual separate modules in the jmods folder... That would be great because certainly the size of the JDK has been significantly reduced: I.e., sizes that are more similar to the sizes of the full JREs produced by JustJ https://download.eclipse.org/justj/jres/24/downloads/latest/ We also produce very small JREs with a subset of modules that are sufficiently functional for the Eclipse Installer (and many other Eclipse RCP-related products) so we really need jlink to continue to work for that purpose: JustJ loves Temurin and https://api.adoptium.net/ ❤️ |
@merks The above error suggests you are adding The other bug referenced affects Windows/Mac only. Consider experimenting with Linux (which doesn't have the |
The existing logic simply include all modules. If it's a simple matter of excluding jdk.jlink that would be very good. I can run the script locally for Windows on my Windows machine to try out your suggest and I will do that immediately! |
- This isn't needed generally and is not supported for Termurin Java 24 - Add --verbose for the jlink call adoptium/adoptium-support#1198
Great! That matches our experience.
FYI: Excluding |
Unfortunately on Windows I suffer from this problem: Error: D:\Users\merks\test-jres\jdk-24+26\bin\dt_socket.dll has been modified I looked closely at the logs and indeed it appears that jlink without jdk.jlink in the module list is working on some of the architectures. But now that I've filtered the jdk.jlink module from the list, it still fails to build a "most-fully" JRE:
This list of modules should be the full list of modules excluding jdk.incubator and jdk.jlink... |
BTW, the script I am using is this one: https://github.com/eclipse-justj/justj/blob/master/releng/org.eclipse.justj.releng/build-jre.sh It runs on each OS like this for linux x64:
So it's pretty easy for anyone to reproduce the problem locally on their machine. Thanks in advanced for all the help so far! |
I wonder what the use-case of this "all-modules-jre" is? Wouldn't the default JDK download be an approximation of this for JDK 24? Are |
JustJ is well documented so one could read that documentation to understand what it's doing. Right now we have a single shell script that works on all supported operating systems and for JDKs from different providers that can be used to produce JREs with subsets of modules and with different aspects, e.g., with and without debug information/src.zip. Generally this is exactly what JDKs support via jlink. It seems reasonable to expect (or certainly to hope) that it will just continue to work as it has for the past 4 years and as it currently works for Java 11, 17, 21, and 23. In principle it would be possible to create new infrastructure to do it (wrapping as OSGi/p2 installable units) differently for Java 24, but as I mentioned we also produce "full" JREs with debug information/src.zip stripped. I would seem better to get to the bottom of the problem rather than to suggest to avoid using jlink when it doesn't work for reasons unknown. After all, I'm probably not the only one who will expect and hope that jlink generally works for Java 24... |
Eureka. Excluding the jdk.jpackage module is also necessary: https://download.java.net/java/early_access/jdk24/docs/api/jdk.jpackage/module-summary.html Windows and MacOS fail because of signing problems:
I think these are both known problem, right? If so, this issue can be closed. |
Yes, or any module depending on See: If you are happy with excluding
Yes, tracked in adoptium/temurin-build#4057 Feel free to re-open if you think there is still something to be done for this. |
Thanks for the confirmation and for the help! Once I realized it's probably just a matter of filtering out problematic modules, it didn't take long to stumble upon jdk.jpackage. So I'm very happy with this solution and I appreciate the very quick help from the Adoptium team! 🏆 |
Question
The JustJ project is repacking Temurin JDKs using jlink:
https://eclipse.dev/justj/
This has been working well up until I tried it with the JDK 24 beta,
https://ci.eclipse.org/justj/job/build-jres/431/
Which is using JDKs such as this one.
https://github.com/adoptium/temurin24-binaries/releases/download/jdk-24+26-ea-beta/OpenJDK-jdk_x64_windows_hotspot_24_26-ea.zip
Each attempt to use jlink fails like this:
Indeed the packaging appears to be different:
This is the last one with a jmods folder
Is this a glitch? JustJ really, really needs JDKs for which jlink works.
Context
Java version:
jdk-24+26-ea-beta
Your operating system and platform:
All these operating systems:
https://ci.eclipse.org/justj/job/build-jres/431/parameters/
The text was updated successfully, but these errors were encountered: