This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178796 - Imported Eclipse Project with main class doesn't put Main-Class attribute in JAR
Summary: Imported Eclipse Project with main class doesn't put Main-Class attribute in JAR
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Eclipse project importer (show other bugs)
Version: 6.x
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-17 09:32 UTC by worldwizard
Modified: 2010-10-25 20:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test NetBeans project that exhibits the bug. (12.79 KB, application/zip)
2009-12-17 09:32 UTC, worldwizard
Details
Eclipse project containing source code. (1.10 KB, application/zip)
2009-12-17 09:36 UTC, worldwizard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description worldwizard 2009-12-17 09:32:08 UTC
Created attachment 92717 [details]
Test NetBeans project that exhibits the bug.

Creating an Eclipse Java project that contains a main method, then attempting to import this project into NetBeans, build it, and run the generated JAR causes the built JAR file to fail to run, because the Main-Class attribute is never put into the generated manifest file. The workaround is to delete the imported NetBeans project and recreate it entirely within NetBeans. Then, it works.
Comment 1 worldwizard 2009-12-17 09:36:06 UTC
Created attachment 92718 [details]
Eclipse project containing source code.

Forgot that NetBeans links to the Eclipse source folder, so this needs to be attached too to reproduce the bug properly.
Comment 2 Rastislav Komara 2010-10-25 14:56:17 UTC
Fixed.
Comment 3 Jesse Glick 2010-10-25 20:01:43 UTC
Thanks for fix; generally Eclipse project importer bugs are not being touched.

BTW when committing:

1. Avoid whitespace-only changes or other reformatting unrelated to the fix.

2. Include a real description in the commit log, not just bug number.

3. Include Hg changeset ID in BZ.

4. Set target milestone.