question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Java 9 Multi-Release JAR files

See original GitHub issue

If 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:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:38 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
lumechecommented, Nov 2, 2018

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)

1reaction
wilkinsonacommented, Nov 9, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found