I’ve just made a “runnable .jar” (or a normal .jar, where I set off manifest on my own. I tryed both) file from my java app with Eclipse.
When I try to open it by double click, i get this message: “could not find or load main class”
From Command Prompt I can run it with ‘java -jar xy.jar’.
Works without any problems.
Can anybody help me?
Make sure your manifest file contains the main-class. Like this.
Main-Class: MyPackage.MyClass
You may want to let eclipse make your manifest just so you can see what it does, then save that manifest file and use it going forward. Also check the class path. You can specify that in the manifest also.
Here’s a link to how to set the entry point in the manifest
You may also need to put the classpath in your manifest.
That can be found here: Adding classpath to manifest