简体   繁体   中英

Error running Jar File

I have created a project in java project using NetBeans IDE. I have few forms in it. The netBeans created a Jar file by its own. when i try to run that Jar file its give an error "Failed to load Main-Class manifest attribute from". I Have set my Starting form in application and when i run from netbeans its running correctly but when i try to run my Jar file its give me this error. Please any one can help me how to solve this netbeans. Thanks

I don't use NetBeans myself, but there's a good step-by-step guide which has screenshots for everything you need to build an executable jar file.

In particular, did you fill in the "Main Class" property in the project properties? I know you says you've filled in the "Starting form" but that may not be the same thing...

Look in the MANIFEST.MF file in the jar file. It should contain a Main-Class line containing the name of the class you want to start when invoking in this manner. If the line is there, doublecheck the spelling of both the class name and Main-Class.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM