NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Netbeans not incuding a Main-Class in the Manifest file

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
RichInTheUSA



Joined: 21 Dec 2016
Posts: 3

PostPosted: Tue Mar 07, 2017 7:51 pm    Post subject: Netbeans not incuding a Main-Class in the Manifest file Reply with quote

Hi, I have a java project that I created in NetBeans8.2, and I want to run it from the command line on a mac. I get an error message that says "no main manifest attribute in target....".

I've read in the documentation that the resulting jar file should have a Manifest.MF file, which should include a Main-Class: attribute.

I've set the main class in the Run Properties for the project, but that does not seem to help. I've also tried both configuration profiles: <default config> and release-profile.

Can anyone help? Thanks in advance.

Here is the contents of the MANIFEST.MF file:
Code:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: rich
Build-Jdk: 1.8.0_112
Back to top
markwade



Joined: 04 Dec 2010
Posts: 342

PostPosted: Wed Mar 08, 2017 1:28 pm    Post subject: Netbeans not incuding a Main-Class in the Manifest file Reply with quote

http://wiki.netbeans.org/QuickStartJavaMavenProject


http://stackoverflow.com/questions/15282098/netbeans-maven-project-not-adding-main-class-to-manifest


On 03/07/2017 02:51 PM, RichInTheUSA wrote:
Quote:
Hi, I have a java project that I created in NetBeans8.2, and I want to run it from the command line on a mac. I get an error message that says "no main manifest attribute in target....".

I've read in the documentation that the resulting jar file should have a Manifest.MF file, which should include a Main-Class: attribute.

I've set the main class in the Run Properties for the project, but that does not seem to help. I've also tried both configuration profiles: <default config> and release-profile.

Can anyone help? Thanks in advance.

Here is the contents of the MANIFEST.MF file:

Code:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: rich
Build-Jdk: 1.8.0_112






Back to top
RichInTheUSA



Joined: 21 Dec 2016
Posts: 3

PostPosted: Wed Mar 08, 2017 2:41 pm    Post subject: Re: Netbeans not incuding a Main-Class in the Manifest file Reply with quote

markwade wrote:
http://wiki.netbeans.org/QuickStartJavaMavenProject
http://stackoverflow.com/questions/15282098/netbeans-maven-project-not-adding-main-class-to-manifest


I had actually searched via google, but didn't find these... THANK YOU!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo