Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How do I solve a missing reference issue? (since 2022-09)
How do I solve a missing reference issue? (since 2022-09) [message #1857163] Fri, 20 January 2023 12:24
Pietro Braione is currently offline Pietro BraioneFriend
Messages: 7
Registered: June 2012
Junior Member
I have a setup under macOS where I have three different JDK versions: Eclipse Temurin 8 [1.8.0_312], Eclipse Temurin 11 [11.0.3], and Eclipse Temurin 17 [17.0.1]. I have a workspace with a project that must rigorously be built with Java 8 (it is a JVM written in Java that only supports Java 8 and metacircularly exploits the libraries of the environment it runs on). The project is built with Gradle. If you need to have a look at it you can find it at https://github.com/pietrobraione/jbse. Until Eclipse 2022-09 I had no problem importing the project under Eclipse, but since Eclipse 2022-09 I have the following compilation problem:

The type java.lang.invoke.VarHandle cannot be resolved. It is indirectly referenced from required .class files

where the class java.lang.invoke.VarHandle is not used by the resource generating the compilation problem. Note that java.lang.invoke.VarHandle is introduced since Java 9. Building everything with Gradle (by double-clicking the build task in the Gradle Tasks view) works well, so the issue is Eclipse compiling the project with ECJ. The only workaround I was able to find is to copy the class generated by the Gradle compilation in the bin/ folder of the project and replace the one generated by the Eclipse ECJ compilation. Is there any better option?

Thank you
Pietro

[Updated on: Fri, 20 January 2023 12:26]

Report message to a moderator

Previous Topic:What are the methods for verifying type ranges using Java Development Tools (JDT)?
Next Topic:Hover to quick-inspect showing an unusable popup
Goto Forum:
  


Current Time: Thu Jan 23 18:48:32 GMT 2025

Powered by FUDForum. Page generated in 0.02674 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top