On 24/06/2020 07:55, [email protected] wrote:
m.canAccess(null) will tell you if the premain method is accessible. If it returns false then you can thrwo IAE with a useful message.Thank you for the example.Yes, I'm working on a helpful message and was thinking to use the Reflection method:IllegalAccessException newIllegalAccessException(Class<?> currentClass, Class<?> memberClass, Class<?> targetClass, int modifiers);
-Alan.
