• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Launching a Java program on Microsoft Windows...

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to find an easy way for my users to launch a Java program on the Microsoft Windows operating system. I wanted something a little more user friendly than a batch file.

I took a look at JSmooth, which is exactly what I need, but it doesn't seem to have a way to permit "dynamic" command line arguments for the JVM. (For example, with a batch file I can read the command line arguments for the JVM from a text file.)

I had thought about writing my own application launcher as a separate Java program. This launcher program would have a simple GUI that would allow the user to select the start-up options, and would then use the runtime.exec() method to launch my main application.

I am wondering how other developers handle this situation. Is there a better solution that I am missing?

Landon
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Landon,

Why not create an executable jar file and then launch it with
. With the proper manifest file in the jar, a user can double click and run the application. If you need, have the first screen be a GUI to configure parameters (unless you need them to configure JVM parameters, such as -Xmx, which I think would be suitable to change through a config file since the average user probably wouldn't be changing these). Hope this helps, but if you have follow-up questions, feel free.

Sincerely,
Jeff
 
Landon Blake
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jeff.

I think I need to create a "default" executable that accepts "default" JVM arguments.

I'll also provide a script that can be modified by more advanced users that want to tweak the JVM arguments.

Thanks for your help.

Landon
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic