Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Open Command Window when Double Clicking jar

Reply
Thread Tools

Open Command Window when Double Clicking jar

 
 
m97rek
Guest
Posts: n/a
 
      10-04-2007
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

 
Reply With Quote
 
 
 
 
bcr666
Guest
Posts: n/a
 
      10-04-2007
On Oct 4, 9:33 am, m97rek <(E-Mail Removed)> wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
cannot convert parameter from 'double (double)' to 'double (__cdecl *)(double)' error Sydex C++ 12 02-17-2005 06:30 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM



Advertisments