I always used the Export → Runnable jar parameter for Eclipse, and it worked fine, but today it seems that in all running jars I create the following error when I run them : (Edit: run them by double-clicking the file.)
Java Virtual Machide Launcher
Could not find the main class: (class). Program will exit.
I tried everything in the last two hours, but it still doesn't work.
- I can still run banks that I created in the past without a problem.
- The manifest file looks exactly like in these banks that the work and all the
.class files appear in place ... - I tried to export using
Package required libraries into generated jar , but the file still does not work. It does not show an error, although double-clicking on a file does nothing.
Change Running the jar file with cmd works fine, but double-clicking on it gives this error. (Bragboy)
Edit 2: The contents of the manifest file from the jar that works: (Obviously they are the same, I just wanted to avoid confusion.)
Manifest Version: 1.0
Class path :.
Main-Class: defender.DefenderComponent (+ two blank lines)
And the contents of the manifest file from the jar, which does not work: (when opening the file directly)
Manifest Version: 1.0
Class path :.
Main-Class: pixel.Entry (+ two blank lines)
Both files of the main class are confirmed to be in the appropriate places.
source share