Does anyone know that problem?
I thought you could open executable .jar
files with the java.exe
.
When I run the .jar
file from the cmd console with java -jar filename.jar
it works completely fine and runs as intended.
But when I tell it to open with the same java.exe
that begins to run when I use the console command it gives:
Error: Could not find or load main class FilePath/filename.jar
Caused by: java.lang.ClassNotFoundException: FilePath/filename.jar
I first tried it with the java.exe
in /bin/
from the built-in JRE from the JDK.
Then I downloaded the JRE from Oracle's website and used the java.exe
in the /bin/
folder there.