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.
|Summary:||Main class was not added to manifest|
|Component:||Compiler||Assignee:||Dusan Balek <dbalek>|
|OS:||Windows 7 x64|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
|Attachments:||Sample project that shows the bug|
Description rafo 2012-11-23 10:09:10 UTC
Netbeans does not generate correct manifest file for a plain java project. When my project has built, there is jar file generated. But its manifest file contains the following information. ****** Mainfest file start ***** Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.4 Created-By: 1.7.0_05-b05 (Oracle Corporation) Class-Path: lib/log4j-1.2.17.jar X-COMMENT: Main-Class will be added automatically by build ****** Mainfest file end ***** As you may notice, main class is not specified.
Comment 1 rafo 2012-11-23 10:20:53 UTC
Created attachment 128301 [details] Sample project that shows the bug I've added a sample Netbeans project that demonstrates the bug I described. "dist" folder contains incorrect jar-file.
Comment 2 rafo 2012-11-23 11:06:17 UTC
It is not an error, but a feature request. If a project contains one or more classes with public static void main(String) methods, then add a warning to notify a user to add main class to the project settings. Or let the developer suppress this warning when necessary.