|All Java 8 classes opened in 2021-13 fail with Java 9 related error, but perhaps caused by Java 16 [message #1839391]
||Fri, 19 March 2021 18:20
| David M. Karr
Registered: July 2009
I've been using 2020-12 since its release with many Java 8 projects. I've been running it with Java 15, but the projects are using the Java 8 JDK. This has been working fine.|
I just started setting up 2021-03 today. I set it to run with Java 16. I exported my preferences from the 2020-12 workspace and imported that into the new 2021-03 workspace. I installed all the plugins I normally use.
I then imported all of the projects I need from my git repositories.
When the dust settled, I saw that any attempt to open a Java class failed with the same error:
java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @18cf5c52
I'm also seeing a slew of dialogs titled "Multiple problems have occurred", saying "Errors occurred during the build", all repeating that same error message. It got to the point that this dialog would come up as fast as I could dismiss it, as projects seemed like they were in a build loop.
The other oddity is that most of the Java projects had a single compile error, saying that "The project cannot be built until its prerequisite xxxx is built. Cleaning and building all projects is recommended". All of them report the same project name as needing to be built. The even stranger part is that there doesn't appear to be any problem with that project. It has no errors.
At that point, I exited Eclipse. I changed the eclipse.ini file to run it with Java 15. I started it back up. Everything compiled fine. I'm going to move forward with Java 15 for now.
Powered by FUDForum
. Page generated in 0.02081 seconds