java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled

前端 未结 1 1699
甜味超标
甜味超标 2021-02-19 06:04

When I run my Ktor application with gradle run then I\'ve got the following exception:

19:21:11.795 [main] DEBUG io.netty.util.internal.logging.Int         


        
1条回答
  •  名媛妹妹
    2021-02-19 06:33

    The access level of each object member cannot be increased anymore. The operation is not allowed anymore since Java 9 and has been hardly disabled in release 11.

    You need to run this application with Java 8.

    See https://www.oracle.com/technetwork/java/javase/9-relnote-issues-3704069.html (search for "setAccessible"). There is a new Object which must now be used to allow it again: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/reflect/AccessibleObject.html

    0 讨论(0)
提交回复
热议问题