Right click an arbitrary existing project in Package Explore, choose \"export...\" - \"Java\" - \"Runnable JAR file\", I find all the old projects in the \"launch configuration\
Go to Run->Run configuration. Delete the existing saved projects under the Java Application.
Then run the class, having main method from eclipse. It will be automatically set.
Now create runnable Jar.