Forums Register Login

Opening .jar from .bat shortcut...

+Pie Number of slices to send: Send
Hey,
I made a program in NetBeans and everything is working OK.
I created a .bat file, which opens the .jar program correctly, but also opens a "cmd window" next to .jar program.

This is in the .bat file:
"folder\program.jar"

This does the same thing:
java -jar "folder\program.jar"

Now I am wondering how one could open this .jar program itself without cmd window next to it, using a .bat file or some other shortcut? Are there any flags like -nocmd..

Thanks
+Pie Number of slices to send: Send
I think the "javaw" command should work here...

Henry
+Pie Number of slices to send: Send
javaw is not wroking, unless i'm doing something wrong..

Here is the screenshot to make thing clearer

+Pie Number of slices to send: Send
The terminal you see is the one that the Batch file is executing in. In order to get rid of it you need to tell Windows to start the application in a 'new' window/terminal. You do this with the START command:
+Pie Number of slices to send: Send
Thank you very much for helping me out, it works perfectly!

You can't expect to wield supreme executive power just because
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1331 times.
Similar Threads
How to include my own package in jar file
Running application
another question about exec() to open a cmd window
To create a desktop short cut icon for the standalone application
Batch file
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:38:10.