1
0

More than 3 years have passed since last update.

Eclipse 2021-06(4.20.0)でlombok 1.18.20適用時のエラー

Last updated at Posted at 2021-08-18

環境

  • java version "16" 2021-03-16

現象と対処方法

以下のエラーが発生してjavaのエディタが開けなくなる。

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 @2b8bb184
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)

とりあえずの対処方法はeclipse.iniに以下を追加する。

--illegal-access=warn
--add-opens java.base/java.lang=ALL-UNNAMED

参考 https://github.com/projectlombok/lombok/issues/2882

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0