File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Launching a Java program on Microsoft Windows... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Launching a Java program on Microsoft Windows..." Watch "Launching a Java program on Microsoft Windows..." New topic
Author

Launching a Java program on Microsoft Windows...

Landon Blake
Ranch Hand

Joined: Dec 04, 2003
Posts: 121
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
Jeff Storey
Ranch Hand

Joined: Oct 09, 2006
Posts: 118
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

Joined: Dec 04, 2003
Posts: 121
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Launching a Java program on Microsoft Windows...