Can't create a runnable jar file via Eclipse

eclipse, jar, java

Solution

Try creating a new launch configuration from scratch:

- `Run` -> `Run Configurations...`

- Right click "Java Application" in the list on the left and select `New`

- On the right enter a descriptive name.

- In the Main tab browse for your project and search for and select the appropriate main class.

- Close the dialog.

Now try exporting your runnable JAR again using that run configuration.

Problem

I made a Java project with Eclipse. The project has a `public static void main(String[] args)` method in it. When I try to export it to a runnable jar, the launch configuration does not include the project I created so I can't create the jar for the project. Any ideas why?

Original source