On 12/25/2011 8:35 AM, nounou wrote:
> Hi :) ,
> I want to do:
> import sun.reflect.generics.reflectiveObjects.NotImplementedException;
> but eclipse raises a problem:
>> Access restriction: The type NotImplementedException is not accessible
>> due to restriction on required library C:\Program
> Can you help me to fix it :cry: ?
> Best regards,
Anything in sun.* wouldn't be available to you in a non-Sun/Oracle JRE.
If you care about portability, don't use it. You can always create
your own Exception type instead.
Eclipse WTP Source Editing and JSDT
You could also suppress this 'error', when you are sure you do not need the portability, by setting the option 'Window | Preferences | Java | Compile | Errors/Warnings | Deprecated and restricted API | Forbidden references (access rules)' to 'Warning' or 'Ignore'. When setting to warning, one can suppress these warnings in the code again, for example in the test-code.