"Could not find main method from given launch configuration" error when exporting jar from Eclipse
Are you selecting correct 'Launch Configuration' in the export dialog? Make sure it's from your project.
Also, once exported you could unzip jar file and look into 'META-INF/MANIFEST.MF' file - there should be 'Main-Class' entry with fully qualified name of your class where the main() method is.
I had this problem and none of the other options worked. Even removing and starting with a new workspace. In my case the problem was that I hadn't manually added the "classes" directory of my project to the classpath of the debug configuration that I was using to debug the java app. I don't know why it didn't pick up the classes directory automatically as part of the project from which I was running the app. In any case it started working again after that.
just had the same problem :s it's annoying but easy to manually fix in the manifest file.
- open the .jar file with winrar or 7zip.
- locate the manifest file (META-INF folder)
- change it to this.
Manifest-Version: 1.0
main-class: (package).(main-class)
In my case i had it in the default package.
Manifest-Version: 1.0
main-class: run