Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Problem with jre
Problem with jre [message #770828] Sun, 25 December 2011 13:35 Go to next message
biatrice nounou is currently offline biatrice nounouFriend
Messages: 1
Registered: December 2011
Junior Member
Hi Smile ,
I want to do:
import sun.reflect.generics.reflectiveObjects.NotImplementedException;

but eclipse raises a problem:
Quote:
Access restriction: The type NotImplementedException is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

Can you help me to fix it Crying or Very Sad ?
Best regards,
Re: Problem with jre [message #773483 is a reply to message #770828] Sun, 01 January 2012 19:12 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2335
Registered: July 2009
Senior Member
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:
> Quote:
>> Access restriction: The type NotImplementedException is not accessible
>> due to restriction on required library C:\Program
>> Files\Java\jre6\lib\rt.jar
>
> 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.

---
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Problem with jre [message #1409906 is a reply to message #773483] Tue, 19 August 2014 09:14 Go to previous message
Gerke Ephorus is currently offline Gerke EphorusFriend
Messages: 5
Registered: November 2011
Junior Member
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. Cool
Previous Topic:How do I clear the cache on Version: Luna Release (4.4.0)?
Next Topic:Running UI application (.exe) inside an Eclipse View
Goto Forum:
  


Current Time: Tue Nov 25 22:24:15 GMT 2014

Powered by FUDForum. Page generated in 0.01616 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software