Support Java 9 Multi-Release JAR files
See original GitHub issueIf a library is included within the executable JAR that states Multi-Release: true
within it’s META-INF/MANIFEST.MF
the spring boot class loader within the executable JAR should support this.
I tested this with 2.0.0.RELEASE (see https://github.com/mvitz/spring-boot-multireleasejar) and it doesn’t work currently.
If there are any more questions or anything I may help you with just ask.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:38 (21 by maintainers)
Top Results From Across the Web
Multi-Release Jar Files - Baeldung
The solution in Java 9 is to leave the original class untouched and instead create a new version using the new JDK and...
Read more >Multi-release JARs - Good or bad idea? - The Gradle Blog
In a nutshell, multi-release jars allow you to package several versions of the same class, for consumption by different runtimes. For example, ...
Read more >JEP 238: Multi-Release JAR Files - OpenJDK
A modular multi-release JAR file is a multi-release JAR file that has a module descriptor, module-info.class , in the root at the top,...
Read more >JAR File Specification
A multi-release JAR file allows for a single JAR file to support multiple major versions of Java platform releases. For example, a multi-release...
Read more >How To Use Multi-release JARs To Target Multiple Java ...
Multi -release JARs allow you to create a single JAR that contains bytecode for several Java versions with jar --version 9 (or 10,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have a funny case here that is blocking me to upgrade to OpenJDK 11 from java 8. I have a project that has a dependency on another that uses Log4J. That specific jar file is a multi-release jar file and the project that I depends on uses a call that is broken for JAVA 9. Log4J fixed this by relying on the multirelease which makes this jar file works in java 8 and java 9 at the same time (all the details in https://stackoverflow.com/questions/52953483/logmanager-getlogger-is-unable-to-determine-class-name-on-java-11). My problem is that since the multi-relese support in spring boot is nor working well my application crashed badly and there is not much that I can do (other than hack the actuall jar and repacking for myself)
@MartyIX Thanks for offering to test the patch. There’s no snapshot yet as the changes have not been merged. You should be able to build Boot reasonably quickly (dependency downloads aside) by running
./mvnw -Pfast -DskipTests clean install
in the root of the repository.