Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse cannot create runnable jar - No resources selected

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 tried to clean the project before exporting, but that didn´t work.

Any ideas on how to fix this.

like image 627
TrashCan Avatar asked Jul 02 '12 08:07

TrashCan


1 Answers

The problem is most likely with your run configuration.

  • Go to your Class that contains the main(String[] args) method you wish to automatically run when the jar is called from the command line
  • Right-click->Run As...->Application
  • Make sure it runs to your satisfaction
  • Now go through the export process as before, selecting the newly created launch configuration.

The last step is key.

like image 118
Robert Christian Avatar answered Oct 07 '22 19:10

Robert Christian