I have a JAR file named helloworld.jar. In order to run it, I\'m executing the following command in a command-line window:
Create .bat file:
.bat
start javaw -jar %*
And choose app default to open .jar with this .bat file.
.jar
It will close cmd when start your .jar file.
cmd