| Summary: | Setting execution environment restricts access to classes even if they are available from elsewhere | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | haen Mising name <marcin.galazka> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.4.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | stalebug | ||
Have you tried changing the build order and put jaxb-api.jar before the JRE on the build path? Yep, it works this way - thx for the suggestion. I'm not sure if this is intuitive, probably some hint in the documentation would be welcomed (or did I missed something?). Feel free to close this bug (or mark as invalid). This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Create a project with one simple class, set JRE to 1.6. import javax.xml.bind.JAXBContext; public class Test { public static void main(String[] args) { System.out.println(JAXBContext.class.getName()); } } Now switch from using full JRE 1.6 to the execution environment J2SE1.5. Eclipse refuses to compile the class with a message: 'Access restriction: The type JAXBContext is not accessible due to restriction on required library /usr/lib/jvm/java-6-sun-1.6.0.10/jre/lib/rt.jar' So far so good - JAXB API is not distrubuted with JRE 1.5 so above message is correct. But this problem persists even I add standalone jaxb-api.jar to the build path. You can download jaxb-api from http://mirrors.ibiblio.org/pub/mirrors/maven2/javax/xml/bind/jaxb-api/2.1/.