Trouble with JAR files
Hey whats up guys. I've created a good few Java programs, but i never got around to actually exporting them so i could use them without opening eclipse. So i figured i'd give it a shot. Unfortunately, I tried exporting one of my programs as a JAR and upon trying to run the program i got an error message: Failed to load Main-Class manifest attribute from <location where i saved my file> Anybody know whats going on? I could really use some help!
To execute a program in a jar file using the java -jar option, the jar file must contain a special file the manifest that contains the name of the starting class on the line starting with: Main-Class:
Check that your jar file contains that file and the the file has the Main-Class record.
No idea how to make your IDE create one.
Thanks, but like you, i have no idea how to do this with my IDE. So anybody else no how to do this with eclipse?
This is a common problem and I remember others posting questions and answers given. Do a Search here.