简体   繁体   中英

Eclipse cannot create a Runnable JAR file

I am trying to export a runnable jar file using eclipse. But everytime When I go through the steps suggested by eclipse and the community here, it comes up with following error:

   No resources selected
    Jar export finished with problems. See details for additional information.
       Could not find main method from given launch configuration.

I even tried exporting a simple hello world jar file, but the same error keeps coming up

Any ideas on how I can fix this problem?

Thanks

Here I'll mentioned the step's. Try this on probably you will get Runnable jar.

  1. Open file menu in eclipse and then select Export option.
  2. Then select java option within that select Runnable Jar File option and then press next. 3.Here within lunch configuration select the starting file you want for Runnable jar and then select the Export destination by browse option.
  3. And then finish, you will fined executed jar created at your select destination.

Got the same issue while exporting one of the jar application.

Solution:

  1. Check the run configuration for the Java application
  2. If there are multiple run configurations make sure the name of the run configuration is same as the project

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM