When I try to export my project as a runnable jar Eclise gives me the following error:
No resources selected.
The project runs fine within Eclipse, I already
Doing a (project->clean) and creating a new run configuration (with correct project and class name with main() method, selected) solved the problem for me.You just have to select the new run configuration while exporting runnable jar :)
Try this, this is the way to create a jar or runnable jar in eclipse, all your external libraries in the project will be included
File -> Export-> Java ->Runnbale JAR file
Launch configuration : your Class containing the public static void main(String[] args)
Export destination : Target place
Library Handling:
Package required libraries into generated JAR
FINISH
When you click this option in Eclipse you should get a popup that lets you choose what files to export, you need to select the src folder.
I was in the same situation. For me deleting existing eclipse installation(not not the project workspace) and opening the existing eclipse workspace with new installation of eclipse was the only thing that worked.
I fixed the problem, I exported the project as an archive file. Then I opened up a new workspace and imported the the archived project. After that I tried to export the project as a runnable jar, after two tries the jar runs as is it should.
I still don't know what the exact cause was but I hope someone how has run into the same problem finds this helpful.
This is basically happen when you change package name under which you made your program. This will create confusion regarding package, as per program export, main method still written in old package. To resolve it, Just copy it and paste it in same package with different name and then try to export it. Check for log too.