How Java restrict reflection access to the field private final ClassLoader classLoader in Class.java? (As shown in documentation in screenshot)
I have found a link which describes that a SecurityManager can be used to restrict reflection access but how can I use that. Please explain in detail.
And after that I want to restrict access only to a particular field.
Found similar question but want to know how can I implement this in my class and as already asked in the question why this is implemented in jdk? Can I also break this chain using reflection?