• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to run jar with no command line?  RSS feed

 
Kuba Bernatowicz
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I've just finished my java app, but the only way I can make it run is by typing :
java -jar MyApp myParameters
, but then I get Windows' command line box.
I need it to run without that, so the only possible way to stop it is killing it in Task Manager ( it runs in background ) .

Can anybody give me an advice ?

TIA
Kuba
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try javaw -jar MyApp myParameters
 
Kuba Bernatowicz
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, that's what I was looking for, but now when I got it working, I need something more .

I thought it was easy to autostart java app in LAN, but I can't figure out how to do this.

I have my app in jar file and I want to run it on several computers in my Windows network ( autostart ), what should I do ?
I tried writing .bat file with
javaw -jar \\192.168.0.4\myApp.jar myParameters , but when I run it all I can hear is BEEP .. so I don't think it's a good idea.

Do I have to use Java Web Start or is there some other way ?

Kuba
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kuba Bernatowicz:

javaw -jar \\192.168.0.4\myApp.jar myParameters ..


What are you trying to do here? Where do you want the application to be executed? On the machine where this jar is located or on some remote machine in your network?
 
Kuba Bernatowicz
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I need to execute it on all machines on my network, so I was thinking that I put a jar file on a network drive (\\192.168.0.3\sth\ <- this is my share ) - so I don't have to copy it on every computer - and execute it at user logon, from a batch file in Autostart.


I didn't want to execute it remotely, but since you asked, I'm thinking of it - if it's possible to execute an application on remote computer without installing any client software? I know there are some Windows apps that can do this, but they all have limitations, for obvious security reasons.
In this case I think it's easier to just execute jar file from network drive.

Kuba
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!