Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8533219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:54:40+00:00 2026-06-11T09:54:40+00:00

I recently just started toying around with Maven in java. Time comes to test

  • 0

I recently just started toying around with Maven in java. Time comes to test my project, it works fine in the NetBeans window, running the main class found in App.java (com.MyCompany.App), but when I try to run it from a command line I get an error:

java -jar fileName.jar

“No Main Manifest Attribute” in fileName.jar

I have tried adding a manifest.mf file specifying what main is, I’ve also been into project properties and added it as the main file…

What’s going on?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:54:41+00:00Added an answer on June 11, 2026 at 9:54 am

    Hope there is a problem in your manifest file. Some basic checks might solve your problem.

    • it should under /META-INF/MANIFEST.MF
    • Content should have Main-Class:com.MyCompany.App

    If you are using any IDE, there should be an option to export project as runnable jar, you can make use of that to let the IDE take care of correct manifest.

    From command line jar cfm filename.jar Manifest.txt com/MyCompany/*.class which generates the Manifest file with following contents

    Manifest-Version: 1.0
    Created-By: 1.6.0 (Sun Microsystems Inc.)
    Main-Class: com.MyCompany.App
    

    And then you can run jar command java -jar fileName.jar.

    These type of problems are trivial but kills lot of time, just ensure your contents and location of the file is correct.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just recently started toying with output buffering and seem to have run into
I'm a Java guy who is familiar with Swing programming and recently just started
I just recently started learning Java. I have a question which is more about
I've just recently started using libsvm. I've been trying for awhile to train my
Warning: I just started learning bash recently and trying to do a recursive function
I just recently started diving into Real World Haskell and the book provides some
I just recently started to experiment with .NET MVC 4. The thing is I
I've just recently started using Github to host my blog (using Jekyll and Liquid).
I've just recently started to build a web site using ASP.NET - MVC 4,
I'm new to Mono and just started recently. Is mono program are compiled from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.