Eclipse cannot create runnable jar - No resources selected

前端 未结 13 1761
失恋的感觉
失恋的感觉 2020-12-29 19:35

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

13条回答
  •  盖世英雄少女心
    2020-12-29 20:04

    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.

提交回复
热议问题