Maven artifacts contain Java 11 bytecode, IntellIj confused. #5680
jeffreycrump-se
started this conversation in
General
Replies: 1 comment 3 replies
-
The Jetty modules are multirelease jars. Basically the code throws exception in the case JDK 11 is used, saying "Hey, Jetty requires JDK 17". With JDK 17, the correct classes are loaded by the JDK. The sources jars contain both JDK 11 (fake) classes as well as the correct classes in the It may be possible that IDE does not understand multi-release jars |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying to implement a Jetty 12/Jersey embeded web app and my IDE is super confused over bytecode versions of
jetty-server
andjersey-contain-jetty-http
:In fact,
org.eclipse.jetty:jetty-server:12.0.8
shows up as compiled with Java 17 butorg.glassfish.jersey.containers:jersey-container-jetty-http:3.1.7
as compiled with Java 11, so my IDE is getting reeeally confused.My Maven scripts build fine against the same libraries but I suspect I'm not actually getting the Java 17 classes.
In the IDE the problem shows up with code like this: "Cannot resolve method 'setHandler(JettyHttpContainer)'"
The IDE doesn't see the JDK17 bytes so it's not getting the right interface definitions.
Building the containers/jetty-http project locally and installing that in my .m2 repository fixes the issue in the IDE. Anyone else experience this? Or am I just losing my mind?
Beta Was this translation helpful? Give feedback.
All reactions