Been pullin' my hair out for hours now on this. I have programmed this project for almost 60 hours and I'm trying to JAR it all up (tried both Eclipse and command line jarring). However, I keep getting this error message when running from command line:
I've written my own MANIFEST.MF file like this (where yourprogram.class has the main method in it)
I've also tried locating this manifest in a directory META-INF so that it should overwrite the default. However, when I jar it up and try to run it, I still get that message. So I made sure the MANIFEST.MF made it into the jar by using
and sure enough, it's in there. However, when I extract the JAR and open META-INF/MANIFEST.MF in Notepad++, it doesn't show the file I created, it shows
If I don't put the MANIFEST.MF file into META-INF, then there are 2 MANIFEST.MF files (one in the default directory and one in META-INF). In this case, the one in the default directory IS the one I created, but the one in META-INF is that default one and I STILL get that error message.
This all happens when I try it in both command line AND eclipse. How do I stop this default MANIFEST.MF file from being used? How do I stop it from overwriting mine when I use META-INF/MANIFEST.MF? Why haven't I had this problem before? Bah!!
Thanks in advance
Quote
no main manifest attribute, in yourprogram.jar
I've written my own MANIFEST.MF file like this (where yourprogram.class has the main method in it)
Main-Class: package.yourprogram
I've also tried locating this manifest in a directory META-INF so that it should overwrite the default. However, when I jar it up and try to run it, I still get that message. So I made sure the MANIFEST.MF made it into the jar by using
Quote
jar -tf yourprogram.jar
and sure enough, it's in there. However, when I extract the JAR and open META-INF/MANIFEST.MF in Notepad++, it doesn't show the file I created, it shows
Quote
Manifest-Version: 1.0
Created-By: 1.7.0_10 (Oracle Corporation)
Created-By: 1.7.0_10 (Oracle Corporation)
If I don't put the MANIFEST.MF file into META-INF, then there are 2 MANIFEST.MF files (one in the default directory and one in META-INF). In this case, the one in the default directory IS the one I created, but the one in META-INF is that default one and I STILL get that error message.
This all happens when I try it in both command line AND eclipse. How do I stop this default MANIFEST.MF file from being used? How do I stop it from overwriting mine when I use META-INF/MANIFEST.MF? Why haven't I had this problem before? Bah!!
Thanks in advance