Juri Strumpflohner
Juri Strumpflohner Juri is a full stack developer and tech lead with a special passion for the web and frontend development. He creates online videos for Egghead.io, writes articles on his blog and for tech magazines, speaks at conferences and holds training workshops. Juri is also a recognized Google Developer Expert in Web Technologies

The type X is not accessible due to restriction on the...

1 min read

For some university course we currently have to modify an Open Source application with LOC > 50,000. So due to our particular interest in Eclipse RCP development, our team has chosen the RSSOwl, a smart Newsfeed reader which is based on Eclipse RCP (you should check it out).
After downloading the latest source from the code repository, the build seemed to be broken since it reported about 18 errors saying something like:
The type [X] is not accessible due to restriction on required library [Y].
...where [X] and [Y] are of course placeholders for the class and jar library :) . After some (actually long) search on the web, one of my collegues found the "solution" for the problem. It was actually a wrong Eclipse configuration of the Java compiler. What has to be done is to set the "Forbidden reference (access rules)" under the "Deprecated and restricted API" from "Error" to "Warning".

In this way Eclipse will treat the problem as a warning instead of an error. I discussed that configuration with the RSSOwl author and he affirmed me that it is fine to have the configuration set to "warning".
Questions? Thoughts? Hit me up on Twitter
comments powered by Disqus