Eclipse Compilation error: [function/type] is not accessible due to restriction on required library … rt.jar

Problem : Eclipse gives the error – “[function/type] is not accessible due to restriction on required library … rt.jar” when building a project.

Reason: Project  classpath (in the build path) is refers to JRE in place of the JDK in which the Project is configured to work with.

Fix:  Go to Java Build Path > Libraries, choose JRE System Library, click Edit button. From the dialog choose Alternate JRE and choose the required JDK.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

46,675 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>