close

[Fixed] java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class

Today We are Going To Solve java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class in Java. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class Error?

  1. How to Fix java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class Error?

    To Fix java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class Error just Add VM param at launch. To solve this error you have to add this VM param at launch. java --add-opens java.base/java.lang=ALL-UNNAMED

  2. java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class

    To Fix java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class Error just Add –illegal-access=warn. –illegal-access=warn and –add-opens java.base/java.lang=ALL-UNNAMED to your eclipse.ini and your error will be solved.

Solution 1 : Add VM param at launch.

To solve this error you have to add this VM param at launch.

java --add-opens java.base/java.lang=ALL-UNNAMED

Solution 2 : Add –illegal-access=warn

To solve this error you have to add –illegal-access=warn and –add-opens java.base/java.lang=ALL-UNNAMED to your eclipse.ini and your error will be solved.

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

Leave a Comment