And Eclipse is usually right about what is and what isn't part of the public API. Usually, Eclipse is right about that, in both senses: We usually do not want to use something which is not part of the public API. Background: Eclipse access restrictionsĮclipse has a mechanism called access restrictions to prevent you from accidentally using classes which Eclipse thinks are not part of the public API. This happened to me as well, and the answers given here already were not satisfying, so I did my own research. 'tEnabledAboutMenu(boolean)' is not API (restriction onĪMEListener cannot be resolved to a type AMEListener cannot beĪccess restriction: The type 'Application' is not API (restriction on required library '/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre/lib/rt.jar') '/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre/lib/rt.jar')Īccess restriction: The constructor 'Application()' is not APIĪccess restriction: The type 'Application' is not API (restriction on Problems: Access restriction: The type 'Application' is not API Here is the error: Exception in thread 'main' : Unresolved compilation JFrame mainFrame = new JFrame('Application Menu Example')
AMEListener listener = new AMEListener()