eclipse-linuxtools/org.eclipse.linuxtools

Docker terminal causes java.lang.reflect.InaccessibleObjectException under Java 17

Closed this issue · 0 comments

The newer versions of EPP (since 2021-12) now ship with Java 17 included. In the Docker terminal support, reflection is used to access a socket instance and this requires accessing public/non-public fields of the java.base JVM module. To run Docker terminal, --add-opens statements must be added to -vmargs when running Eclipse or else they must be put in the eclipse.ini file for -vmargs

The following statements are needed:

--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/sun.security.ssl=ALL-UNNAMED

Failure to do so causes java.lang.reflect.InaccessibleObjectException to occur

Bug 578660 has been created to track this in bugzilla