当前位置:Gxlcms >
数据库问题 >
Java反射操作成员变量 Class can not access a member with modifiers "*"
Java反射操作成员变量 Class can not access a member with modifiers "*"
时间:2021-07-01 10:21:17
帮助过:3人阅读
pers.hanchao.reflect.common.User with modifiers "private"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102
)
at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296
)
at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288
)
at java.lang.reflect.Field.get(Field.java:390
)
at
解决方案:添加一行代码:fields[j].setAccessible(true);
Java反射操作成员变量 Class can not access a member with modifiers "*"
标签:not demo rem obj int sse lan com color