Eclipse has a mechanism called access restrictions to prevent you from accidentally using classes which Eclipse thinks are not 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. And Eclipse is usually right about what is and what isn't part of the public API.
Problem
Now, there can be situations, where you want to use public Non-API, like sun.misc
(you shouldn't, unless you know what you're doing). And there can be situations, where Eclipse is not really right (that's what happened to me, I just wanted to use javax.smartcardio
). In that case, we get this error in Eclipse.
Read full article from java - Access restriction: The type 'Application' is not API (restriction on required library rt.jar) - Stack Overflow
No comments:
Post a Comment