Bug 75969 - Getting NullPointerException in JavaCore.getDefaultOptions()
Summary: Getting NullPointerException in JavaCore.getDefaultOptions()
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 2.1.2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-08 17:38 EDT by tim orme CLA
Modified: 2004-10-13 09:59 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tim orme CLA 2004-10-08 17:38:16 EDT
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)
Comment 1 Olivier Thomann CLA 2004-10-09 08:52:34 EDT
You need to use JDT/Core in a headless Eclipse. If not, you get this
NullPointerException.
Comment 2 Frederic Fusier CLA 2004-10-13 09:59:07 EDT
*** Bug 76161 has been marked as a duplicate of this bug. ***