Found solution at: https://stackoverflow.com/questions/9266632/access-restriction-is-not-accessible-due-to-restriction-on-required-library
I ran into something similar, I think that the cause of the warning is Eclipse trying to discourage you from using the internalcom.sun
packages that are installed as part of your workspace JRE but which are not part of the public Java API.As Justin says in his answer, changing your compiler settings can hide the warning. A more fine-grained approach is to modify your build path to explicitly allow access to the package in question:
- Open the Libraries tab of the Java Build Path project property window.
- Expand the JRE System Library entry.
- Select "Access rules" and hit the Edit button.
- Click the Add button in the resulting dialog.
- For the new access rule, set the resolution to Accessible and the pattern to
"com/sun/xml/internal/**"
.After adding this access rule, your project should build without these warning.
No comments:
Post a Comment