Add support for Java 9 multi release jars
See original GitHub issueI’ve just updated a dependancy and it is now providing a multi release jar. This results in the following error when building:
Can't process class [META-INF/versions/9/com/teamdev/jxbrowser/chromium/internal/JavaVersion.class] (Unsupported class version number [53.0] (maximum 52.0, Java 1.8)))
Proguard doesn’t yet support Java 9 but does have a workaround for this, which is to exclude the versions folder for library jars, eg:
--libraryjars somelib.jar(!META-INF/versions/**)
I’ve added support for this by blindly adding this exclusion for all library jars.
Does this sounds like an acceptable solution? If so I’ll put a pull request together.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:18
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
Multi -release JARs, aka MRJARs, are a new feature of the Java platform, included in the Java 9 JDK. In this post, we...
Read more >Add support for building Java 9 multi-release jars : IDEA-168946
Add the ability to designate source directories in a module as multi-release (MR) directories, using a different JDK, but depending on the primary...
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 >Support Java 9 Multi-Release JAR files · Issue #12523 - GitHub
To support multi-release jars, our JarFile class that subclasses java.util.jar.JarFile needs to call the super constructor that takes a Runtime.
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 FreeTop 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
Top GitHub Comments
hi @wvengen , is there any update regarding this issue? I was trying out Proguard for my project for the first time and I am currently stuck with this.
From https://wvengen.github.io/proguard-maven-plugin/