• Register
1 vote


I've got a project in which I'm using Java+Scala+Slick2D. The project itself runs well when launched from within eclipse. But when I try to make a jar file, it just refuses to work. Here's the error I keep getting when trying to export it as a Runnable jar: could not find main method from given launch configuration with an eclipse UI Runnable JAR File export

What could be the right solution for this particular situation? Any idea?

12 7 7
15,250 points

1 Answer

1 vote


I just encountered the same problem. I solved it on my own.

If you are using a windows-based Eclipse, you may follow these steps below:

  1. Open "Run As" --> "Run Configuration" on the project you want to export

  2. Click "Search" for Eclipse to refresh the list of main class

  3. Then export the Runnable JAR file again, and everything goes smoothly.

Please let me after completing those steps if it is not working. We may find another way.

13 9 6
94,240 points
Still did not work after following steps

Related questions

0 votes
2 answers 872 views
Problem : I get the following error when I execute jar command in cmd. 'jar' is not recognized as an internal or external command, operable program or batch file. I tried very hard to solve this problem by myself by putting the path of the jar.exe file in my "path" variable ... I got the same error. Please let me know my mistake and how to fix it. I need to create jar files via the command line.
asked Nov 21, 2019 peterlaw 6.9k points
0 votes
1 answer 295 views
Problem: I am very new to Cucumber. Recently I was reworking my project in the Intellij into my modules and suddenly I came across below error: "C:\Program Files\Java\jdk1.8.0_181\bin\java.exe" "-Dorg.jetbrains.run.directory=C:\Users\Raphael\Documents\1_Code Stuff ... guru-pet-clinic" Error: Could not find or load main class cucumber.cli.Main Can some Cucumber expert help me in fixing above error?
asked Jul 27 Raphael Pacheco 4.9k points
0 votes
1 answer 827 views
Problem : When I run the apache tomcat7.0.56 in Eclipse, I get below error Error: Could not find or load main class org.apache.catalina.startup.Bootstrap How can I fix the above problem?
asked Jan 18 jwilliam 3.9k points
0 votes
2 answers 208 views
Problem : I am stuck with following Maven issue. Error: could not find or load main class org.codehaus.plexus.classworlds.launcher.launcher My Maven was working fine till last week after that I do not know what went wrong with it now it gives me the error I have tried replacing ... Java(TM) SE Runtime Environment (build 1.7.0_75-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
asked Nov 24, 2019 alecxe 7.5k points
0 votes
1 answer 83 views
Problem : I am getting bellow compiler error error: could not find or load main class com.sun.tools.javac.main
asked Nov 5, 2019 peterlaw 6.9k points