Java 15 support
See original GitHub issuePlease 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:
- Created 3 years ago
- Reactions:4
- Comments:5
Top 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 >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
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:
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.
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