Platform and architecture (e.g. Linux/x64: Linux/x64 (others possibly also affected, but not checked)
Java version (from "java --version") e.g. 1.8.0_181, 11.0.4+11 etc.: 14+36, 14+36.1
Variant e.g. HotSpot or OpenJ9: all
Have you tested it with other vendors' java: No
Steps to reproduce: Download and extract the current HotSpot, OpenJ9 and OpenJ9 Large Heap JRE archives for AdoptOpenJDK 14.
Error messsage and/or description of what is not working as expected: The archives contain bin/javac, which I don't expect to find in a JRE archive. bin/javac also doesn't seem to present in the equivalent archives for Java 13.
Appears to be the case for the Hotspot release too, and it wasn't the case for JDK13, so I'm going to adjust the title
[sxa@localhost shm]$ tar tvfz OpenJDK14U-jre_x64_linux_openj9_14_36_openj9-0.19.0.tar.gz | grep javac-rwxr-xr-x root/root 8672 2020-03-18 19:31 jdk-14+36-jre/bin/javac
[sxa@localhost shm]$ tar tvfz OpenJDK14U-jre_x64_linux_hotspot_14_36.tar.gz | grep javac-rwxr-xr-x root/root 8672 2020-03-17 19:51 jdk-14+36-jre/bin/javac
[sxa@localhost shm]$
[sxa@localhost shm]$ tar tvfz OpenJDK13U-jre_x64_linux_hotspot_13.0.2_8.tar.gz | grep javac
[sxa@localhost shm]$
I believe this chain leads to the inclusion of all of these (unexpected) launchers:
javac
javap
jdeprscan
jdeps
jimage
jlink
jmod
jpackage
serialver
JRE_MODULES includes JRE_TOOL_MODULES (see [1])JRE_TOOL_MODULES includes jdk.incubator.jpackage (see [2])jdk.incubator.jpackage requires jdk.jlink (see [3])jdk.jlink requires jdk.jdeps (see [4])jdk.jdeps requires jdk.compiler (see [5])Launcher-jdk.compiler.gmk defines the rules to build javac (see [6])Perhaps this is in part why the make target legacy-jre-image includes the term 'legacy'.
[1] https://github.com/ibmruntimes/openj9-openjdk-jdk14/blob/openj9/make/Images.gmk#L46-L47
[2] https://github.com/ibmruntimes/openj9-openjdk-jdk14/blob/openj9/make/common/Modules.gmk#L135-L137
[3] https://github.com/ibmruntimes/openj9-openjdk-jdk14/blob/openj9/src/jdk.incubator.jpackage/share/classes/module-info.java#L49-L50
[4] https://github.com/ibmruntimes/openj9-openjdk-jdk14/blob/openj9/src/jdk.jlink/share/classes/module-info.java#L51-L53
[5] https://github.com/ibmruntimes/openj9-openjdk-jdk14/blob/openj9/src/jdk.jdeps/share/classes/module-info.java#L56-L58
[6] https://github.com/ibmruntimes/openj9-openjdk-jdk14/blob/openj9/make/launcher/Launcher-jdk.compiler.gmk#L28-L32
I'm not sure we'll want to change anything in that case? The legacy target really is a best-effort target.
I don't think we should expect much upstream help here. Instead of using the legacy-jre-image target, could use the following command to get something closer to what I think people will expect of a JRE:
images $ ./jdk/bin/jlink --add-modules java.se --no-header-files --no-man-pages --output jre
For OpenJ9, we will want to include the openj9.jvm and openj9.sharedclasses modules as well.
Thoughts, anyone?
It raises further questions about how we surface this to end-users. It become 'our' definition off what an AdoptOpenJDK JRE is and isn't. Flagging this for the TSC.
Perhaps our efforts should be focussed on making https://github.com/AdoptOpenJDK/jlink.online the source of right-sized Java packages. The JRE links at https://adoptopenjdk.net/ could refer to the appropriate resource at jlink.online.
@sxa555 Thanks for checking, I indeed hadn鈥檛 checked HotSpot builds. I鈥檝e added that to the ticket description now.
I also haven鈥檛 checked builds for other platforms, but I guess the issue is not limited to Linux/x64 either.
TSC voted to build jlinked bundles for 11, 14 and tip - working name adopt bundle. We will host these alongside the legacy jre bundles for 11 and 14.
A decision will be made on 15+ but as the legacy jre target is no longer valid we may only produce 'adopt bundles' going forward.
We'll have to do this after July CPU release
bin/java might require javac for JEP330 "Launch Single-File Source-Code Programs" which added another way of running java 11+ programs.
Most helpful comment
TSC voted to build jlinked bundles for 11, 14 and tip - working name
adopt bundle. We will host these alongside the legacy jre bundles for 11 and 14.A decision will be made on 15+ but as the legacy jre target is no longer valid we may only produce 'adopt bundles' going forward.