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?

0

2 Answers 2

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
-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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .