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.

Please add JDK 15 support. Version 4.2.3 currently doesn’t support it, for example:

java.lang.IllegalArgumentException: Unsupported class file major version 59
	at com.google.inject.internal.asm.$ClassReader.<init>(ClassReader.java:195)
	at com.google.inject.internal.asm.$ClassReader.<init>(ClassReader.java:176)
	at com.google.inject.internal.asm.$ClassReader.<init>(ClassReader.java:162)
	at com.google.inject.internal.asm.$ClassReader.<init>(ClassReader.java:283)
	at com.google.inject.internal.util.LineNumbers.<init>(LineNumbers.java:69)
	at com.google.inject.internal.util.StackTraceElements$1.load(StackTraceElements.java:49)
	at com.google.inject.internal.util.StackTraceElements$1.load(StackTraceElements.java:45)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3529)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2278)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
	... 52 common frames omitted

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5

github_iconTop GitHub Comments

3reactions
Ganesh-Bhargav-CHcommented, Oct 20, 2020

Error: java.lang.IllegalArgumentException: Unsupported class file major version 59

Explanation: Class file Major version 59 corresponds to Java 15. You are using Java 15 (and compiling your code for it so the generated class files are only valid for Java 15 and newer).

The easy fix is to reconfigure your build to compile for Java 14 or earlier depending on what version of Java you need to use.

You can set the version of compiler at compile time. And compile your java code into old versions of java.

From Oracle article : http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javac.html

Cross-Compilation Example

Here we use javac to compile code that will run on a 1.4 VM.

Command:

javac -target 1.4 -bootclasspath jdk1.4.2/lib/classes.zip \
             -extdirs "" OldCode.java

You might also need following parameter to set denote the version of your code.

-source release -Specifies the version of source code accepted.

This should support Apps developed with Java version 15 and newer and not able to run guice.

Hope this helps resolve the issue.

0reactions
markmarchcommented, Oct 30, 2020

We’ve just released 5.0.0 beta, with Java 15 support, please test it with your project and report bugs.

See https://github.com/google/guice/wiki/Guice500

Read more comments on GitHub >

github_iconTop Results From Across the Web

Oracle Java SE Support Roadmap
Oracle provides this Oracle Java SE Support Roadmap, to help you understand maintenance and support options and related timelines.
Read more >
Java/OpenJDK - endoflife.date
Release Released Active Support 19 2 months and 3 weeks ago. (20 Sep 2022) Ends in 3 months and 1 week. (21 Ma... 18 8...
Read more >
Java version history - Wikipedia
Java 7 is no longer publicly supported. For Java 11, long-term support will not be provided by Oracle for the public; instead, the...
Read more >
What's New in Java 15 - Baeldung
As Java 15 is not a long-term-support release, we can expect support for it to end in March 2021. At that time, we...
Read more >
OpenJDK Life Cycle and Support Policy - Red Hat Customer ...
OpenJDK is the Java Development Kit (JDK) and Java Runtime Environment (JRE) in Red Hat ... Ubuntu 20.04.x Support, Ubuntu 18.04.x Support, SLES...
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