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

  1. ,

    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.

  2. ,

    When a member (Variables, methods, and constructors) is private, it is only accessible within the same class as it is declared. Attempting to access or instantiate it from another class would throw java.lang.IllegalAccessException exception.

Solutions on the web

via Coderanch by Ernest Friedman-Hill, 1 year ago
Class pack2.Other can not access a member of class pack1.Base with modifiers "public"
via Coderanch by Maulin Vasavada, 1 year ago
Class pack2.Other can not access a member of class pack1.Base with modifiers "public"
via Coderanch by Adeel Ansari, 1 year ago
Class two.TestReflection can not access a member of class one.Test with modifiers "public"
via Oracle Community by 807606, 9 months ago
Class test1.TestRunMethod can not access a member of class test2.MyTargetClass with modifiers "public static"
via Stack Overflow by Carven
, 2 years ago
Class com.myapp.core.utils.EventDispatcher can not access a member of class appApp$1 with modifiers "public"
via GitHub by mslinn
, 2 years ago
Class sbt.Run can not access a member of class com.micronautics.akka.dispatch.futureJava.ZipBlocking with modifiers "public static"
java.lang.IllegalAccessException: Class pack2.Other can not access a member of class pack1.Base with modifiers "public"	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)	at java.lang.reflect.Method.invoke(Method.java:317)	at pack2.Other.main(Other.java:10)