• Register
1 vote
490 views

Problem:

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

Please log in or register to answer this question.

1 Answer

1 vote

Solution:

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.
Thanks.

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

Related questions

0 votes
1 answer 30 views
30 views
Why is Eclipse not detecting the main class in this case?
asked Jan 5 TeamScript 13.5k points
0 votes
1 answer 2 views
2 views
Problem: I need someone’s help to fix it .. Could not find or load main class eclipse
asked 6 hours ago Ifra 34.7k points
0 votes
1 answer 2 views
2 views
Problem: Does anyone know the solution of it? So kindly let me know .. Eclipse could not find or load main class
asked 6 hours ago Ifra 34.7k points
1 vote
1 answer 1 view
1 view
Problem: I am unable to execute .Jar files. Java virtual machine launcher could not find the main class.
asked Apr 26 PkGuy 23.5k points
0 votes
1 answer 8 views
8 views
Problem: I need someone’s assistance to solve my problem .. error could not find or load main class in eclipse
asked Apr 18 Ifra 34.7k points
0 votes
1 answer 10 views
10 views
PROBLEM : Need your help to solve this >'error: could not find or load main class jar' ?
asked Mar 16 Samiur1 38.4k points
0 votes
1 answer 25 views
25 views
Problem : failed to load main-class manifest attribute from a JAR file?
asked Feb 25 Sabbir Hossain 14.6k points
0 votes
1 answer 54 views
54 views
Problem: invalid signature file digest for manifest main attributes.
asked Feb 18 charles mathews 5.5k points
0 votes
1 answer 5 views
5 views
Problem: Do u guys have any suggestions on what am I doing wrong?
asked 2 days ago salim1 60.6k points
0 votes
1 answer 3 views
3 views
Problem: I've written a launcher for Minecraft 1.12.2 in Python, which just prepares a command and runs it using subprocess. PROBLEM: Ubuntu version executes perfectly, without any complain, but Windows version says: Error: Could not find or load main class net ... temporary folder and forms the command to launch minecraft, which could be just written by hand and pasted into a script and executed.
asked 3 days ago anika11 32k points