| Summary: | Unable to compile code with System.getSecurityManager() call under Java 9 build 126 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Scott M Stark <starksm64> | ||||
| Component: | Core | Assignee: | Jay Arthanareeswaran <jarthana> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jarthana, szegedia | ||||
| Version: | 4.6 | ||||||
| Target Milestone: | BETA J9 | ||||||
| Hardware: | Macintosh | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 263194 [details]
Screenshot of the SecurityManager.class open in package explorer
I have the same issue.
I'm attaching a screenshot of the Package Explorer window descending into "JRE System Library [Java SE-9]/java.base/java.lang" branch. You can see that there's an entry for "SecurityManager.class", but it is empty (there's no triangle next to it and no green circle "C" node for the class). I opened the adjacent .class files, SecurityException.class and Short.class and you can see Eclipse can see the classes in them.
It seems Eclipse is unable to parse the SecurityManager.class file for some reason.
This is already fixed via bug 497218. Please wait for the next feature patch to get this. *** This bug has been marked as a duplicate of bug 497218 *** Thanks Jay, appreciate it. |
I'm using the Eclipse JDT (Java Development Tools) Patch with Java 9 support (BETA) for Neon development stream 1.1.1.v20160606-0010_BETA_JAVA9 to enable Java 9 support, and I am unable to compile any code that has a System.getSecurityManager() call. The problem is that the compiler is not resolving the return type to java.lang.SecurityManager. It is instead resolving to com.sun.org.apache.xerces.internal.util.SecurityManager. This simple class: public class TestSecurityManager { public static void main(String[] args) { SecurityManager sm = System.getSecurityManager(); } } has the following error in the Problems view: The type java.lang.SecurityManager cannot be resolved. It is indirectly referenced from required .class files