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.

Add support for Java 9 multi release jars

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:18

github_iconTop GitHub Comments

2reactions
ocindcommented, Apr 12, 2019

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.

1reaction
justincranfordcommented, Jan 2, 2020

From https://wvengen.github.io/proguard-maven-plugin/

You can use inLibsFilter to apply ProGuard classpathentry Filters to all input lib jars
    <inLibsFilter>!META-INF/versions/**</inLibsFilter>

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

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