Spiga

Not Accessible Due To Restriction On Required Library

Not Accessible Due To Restriction On Required Library

Today, I was working on some java project in my favourite Eclipse editor, when I encountered some unknown problem. It was throwing some error that the calss cannot be accessed due to restriction on required library. This type of error occurs when some classes cannot be loaded into the projects since some restriction rules are being imposed on those classes. Similarly, I got the error like this:




How To solve this Exception:

As this error is coming because of some setting where we are excluding some files. So we need to change that settings. For that, click on the 'Windows' --> 'Preference' and then go to 'Java'-->Compiler-->'Error/Warnings' tab. You will find 'Forbidden reference (access rules):' and its value has been set to 'Error'. So we only need to do is, to change the 'Error' to 'Warning', and all is done.


0 comments: