[Logo]
Forums Register Login
Jar is created But while runing says Failed to load Main-Class manifest attribute from
I have my main class Quiz3 in package mine

package mine;
//imports
public class Quiz3 extends JFrame{
....
}

Then I created jar file as


jar -cvfm PlayQuiz.jar manifest.txt mine./*.class ( manifest.txt have one line Main-Class:mine.Quiz3 )

It creates jar successfully but when I run it , it gives error "Failed to load Main-Class manifest attribute form C:\Users\Mahtab\Desktop\PayQuiz.jar"

What is the problem ?
What is the output of jar tf PlayQuiz.jar ?
jar tf Play.jar

META-INF
META-INF/MANIFEST.MF
mine./Quiz3$1.class
mine./Quiz3$2.class
mine./Quiz3$3.class
mine./Quiz3$4.class
mine./Quiz3$5.class
mine./Quiz3$6.class
mine./Quiz3$Report$1.cla
mine./Quiz3$Report$Draw.
mine./Quiz3$Report.class
mine./Quiz3.class
mine./updateCount.class
The dot in the directory name looks misplaced.
Yes it is

META-INF
META-INF/MANIFEST.MF
mine./Quiz3$1.class
mine./Quiz3$2.class
mine./Quiz3$3.class
mine./Quiz3$4.class
mine./Quiz3$5.class
mine./Quiz3$6.class
mine./Quiz3$Report$1.class
mine./Quiz3$Report$Draw.class
mine./Quiz3$Report.class
mine./Quiz3.class
mine./updateCount.class

What yo you mean by "yes it is"? You need to remove it, since the package name does not have a dot in it.
No there is not .(dot) in package name.

So why did you use one in the jar command?
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 23, 2017 02:55:40.