• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to run jar with no command line?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try javaw -jar MyApp myParameters
 
Kuba Bernatowicz
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic