0

to execute a jar file, at the first i installed openjdk pakeges and then next command:

java -jar ccnChat.jar

I got this error: Failed to load Main-Class manifest attribute from ccnChat.jar

then i tried another way: i right clicked on the jar file, and i marked allow executing file as program from permissions tab and i chose openjdk as its default program. then i double clicked on jar file but it didn't open. And there is not any message or error. Could u please help me that how can i execute this jar file?

samira
  • 13

2 Answers2

0

"Failed to load Main-Class manifest" => This is not a problem with you JDK but only with your MANIFEST.MF file. Have you specified a main-class? Your manifest file should be like this :

Manifest-Version: 1.0
Created-By: 1.7.0_06 (Oracle Corporation)
Main-Class: MyPackage.MyClass

Then you could try to execute again :

java -jar ccnChat.jar
jpmottin
  • 119
  • 3
-1

Use the following command: java -jar file.jar

The answer needs to haveat least thirty words, so here is some more text, just ignore it

Uwe Burger
  • 642
  • 3
  • 3