For ease I’ll use hello world…
public class HelloWorld{
public static void main (String [] args){
System.out.println("Hello World");
}
}
Compiles and runs fine as you’d imagine. Then made a file Manifest.txt containing:
Main-Class: HelloWorld
then ran:
jar -cfm Hello.jar Manifest.txt *.class
However when I double click the resulting Hello.jar, nothing happens. I’d expect the console to pop up quickly at least…
(I in fact have a more elaborate program which waits for input)
Any ideas why this is not working?
It is starting a process in the task manager (windows) but no cmd openning
Try executing from command line
Make sure you have
Main-ClassentrySee Also