Open Command Window when Double Clicking jar

M

m97rek

Hi,


I have jar file which is nothing more than a command line application
(think Hello World). It works fine from the command prompt but I would
like it to work when double clicking it. When I do so nothing happen.
I assume that the application actually runs in the background.

I run Windows XP if that matter.

Thanks
 
B

bcr666

Hi,

I have jar file which is nothing more than a command line application
(think Hello World). It works fine from the command prompt but I would
like it to work when double clicking it. When I do so nothing happen.
I assume that the application actually runs in the background.

I run Windows XP if that matter.

Thanks

Your problem might be in that when you double click on the Icon, the
program opens a console window, runs, then closes the window. To get
around this, you can either make your program not close (or take some
user action to close), or you can write a batch file that takes a
parameter (jar file) and executes it, then issues a dos "pause"
command. If you use the second option, you'll need to make sure
windows sends the file to the batch program when you double click on
the .jar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top