My . jar files generated by Eclipse are not opening

Asked

Viewed 2,358 times

0

I’ve done everything I know and found on the internet to open a file. jar, but nothing works. When I do 2 clicks it just doesn’t open, it doesn’t error, but it doesn’t open anything either. I have tried running from Windows Command Prompt, the following appears. " no major manifest attribute in Gym.jar, "I already opened that folder in the manifest, I made a change but it’s still the same thing.

I also tested the file on another computer, gave in it. I generated other files . jar and also does not work. I generate these files by eclipse. It had already generated files . jar a few months ago and it worked normal, but now I don’t know what else to do.

Inside my MANIFEST.MF file has the following information: Manifest-Version: 1.0 Sealed: true.

  • You did java -jar seuarquivo.jar ?

  • Already, this appears. "no major manifest attribute in Gym.jar"

  • How did you beget this jar?

  • By exporting from eclipse option, then generate JAR file and finally choose the file that contains the main method.

  • Your mistake is that there is no main class in your JAR Manifest. This can only be because Eclipse did not find a main class (a class with a main method) in your project. Make sure you’re all right with your project. Also, try to open your JAR with 7-zip or similar, open your Manifest file and put its contents in question.

  • The code is written correctly, has a main method, and in the eclipse it runs normal without problem. I opened in Winrar on MANIFEST.MF file only has, Manifest-Version: 1.0 and Sealed: true, that’s all you have.

Show 1 more comment

1 answer

2


Probably, when creating the file, the "Launch Configuration" option is selected the wrong class...

imagem de export do eclipse

  • Dude, that’s what I said. Now it’s working normal. I never would have thought of it. Thanks.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.