Summary: | NullPointerException from JavaCore | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | tim orme <tim_orme> |
Component: | Ant | Assignee: | Platform-Ant-Inbox <platform-ant-inbox> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.1.2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
tim orme
2004-10-13 09:35:32 EDT
*** This bug has been marked as a duplicate of 75969 *** As now you're running in headless mode this is obviously not a duplicate, I've read it too quickly, sorry for that. In fact it would have been less confusing to reopen bug 75969... I think you need to define a plugin that requires jdt.core. Move to Platform/Ant for comments. Running a simple Java program via Ant through headless Eclipse will not correctly configure the JDT core plugin. JDT is not initialized or even used except by your code in this case. The plugin lifecycle methods will not be called and result in the NullPointerException. One way to succeed is to create an Ant task. In the execute() method of your Ant task have the code you currently have in main(String[]) Create a plugin that requires JDT Core and contribute your Ant task using the Ant core extension points. Add your plugin to the Eclipse set of plugins (use - clean to have the new plugin discovered). Modify your build file to execute your task. |