Community
Participate
Working Groups
The following code compiles (I've stripped out other code to assure it wasn't something else I was doing) public static void main(String[] args) throws Exception { JavaCore.getDefaultOptions(); } but throws the following exception when run java.lang.NullPointerException at org.eclipse.jdt.core.JavaCore.getDefaultOptions(JavaCore.java:1545) at TestClass.main(TestClass.java:45) Exception in thread "main" Am I missing some configuration/setup? (I'm new to using these APIs)
You need to use JDT/Core in a headless Eclipse. If not, you get this NullPointerException.
*** Bug 76161 has been marked as a duplicate of this bug. ***