java.lang.IllegalAccessException: Class ClassTrouble can not access a member of class Cls with modifiers "private"

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

If you want to access functions/variables of a class from a different class they can't be private. The modifier private means that a function/variable can only be accessed from within the same class. Try the default, protected or public modifier.

Solutions on the web

via javadev.ru by Unknown author, 2 years ago
Class ClassTrouble can not access a member of class Cls with modifiers "private"
via csdn.net by Unknown author, 1 year ago
Class ClassTrouble can not access a member of class Cls with modifiers "private"
via oracle.com by Unknown author, 2 years ago
Class ClassTrouble can not access a member of class Cls with modifiers "private"
via oracle.com by Unknown author, 2 years ago
Class ClassTrouble can not access a member of class Cls with modifiers "private"
via Coderanch by Raja Mirrah, 11 months ago
Class com.att.ctp.webSvcs.TestResultsService.server.GetTestResultsTranslator can not access a member of class java.util.Calendar with modifiers "protected"
via netbeans.org by Unknown author, 2 years ago
Class org.hibernate.ejb.event.CallbackResolver can not access a member of class net.opensolutions.project.entity.UpdateListener with modifiers ""
java.lang.IllegalAccessException: Class ClassTrouble can not access a member of class Cls with modifiers "private"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.Class.newInstance0(Class.java:349)
at java.lang.Class.newInstance(Class.java:308)
at undefined.ClassTrouble.main(ClassTrouble.java:9)

Users with the same issue

Once, 3 weeks ago
2 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 2 months ago
Once, 8 months ago
42 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.