Reputation: 1028
I have exported a Java program to a .jar file. When I run it from the cmd, it works fine and shows me the output. When I try to double-click it, it surely starts (because it asks me for an input), but then I can't understand if it keeps working because I can't see any output. Any help?
Upvotes: 0
Views: 222
Reputation: 1498
You should write the output to a file or keep calling it from a batch file. The content of this file should be like:
java -jar yourJar.jar
Then you can doubleclick the .bat file. Make sure your JAR contains a manifest that specifies the main class.
Upvotes: 3