Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using sun.reflect package with openjdk11

Is there a way to use sun.reflect in OpenJDK11, by maybe adding something in "--add-exports"? Our code fails since a jide pkg internally uses sun.reflect package and I'm trying to see if there's a way to make it work.

I've already tried with the below but that doesn't help.

"--add-exports jdk.unsupported/sun.reflect=ALL-UNNAMED"

Here's the exception, where the underlying class references sun.reflect.Reflection

java.lang.NoClassDefFoundError: sun/reflect/Reflection
like image 385
user3723491 Avatar asked May 19 '26 01:05

user3723491


1 Answers

I had this problem and fixed it by using a newer version of jide. Changing from jide-whatever:3.2.3 to jide-whatever:3.7.6 was enough to make it work in my case.

like image 122
Guest Avatar answered May 22 '26 00:05

Guest



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!