Hi,
How can I distribute a java aplication as a .exe file? I've read about
executable jars, but those require either a command or the right
association for the jar files. I would like my small group of users to
simply be able to click an a .exe file or a .bat without an additional
installation. All of my users a guaranteed to have java installed on
their machines.
Thanks!
Aaron Fude
Jason in Colorado - 07 Jun 2006 02:09 GMT
For Windows, write a .bat file. You may want to look for the proper
JVM version and path on the client as well. The .bat file would issue
a java command at some point, probably with command line args, to fire
up the class with the main entry point.
Thats it.
On Solaris/Linux/Unix/BSD write a shell script.
> How can I distribute a java aplication as a .exe file?
Luc The Perverse - 07 Jun 2006 03:37 GMT
> Hi,
>
[quoted text clipped - 4 lines]
> installation. All of my users a guaranteed to have java installed on
> their machines.
I'm not sure you are asking the right question.
Are you sure you want the jar file to be clickable, or do you just want a
convenient method for running the program?
I suggest using an installation program which can create quicklaunch,
desktop and or start menu shortcuts. These can invoke the JAR file through
either java.exe or javaw.exe, whichever is appropriate for your application.
Putting a BAT file with your JAR file will make it much easier to be run -
but most people do not have winrar installed on their system - this is the
only decompression program I know of that by default will steal the JAR file
association from Sun. On windows jar file double clicking after
installation of JRE will invoke the program contained therein.
--
LTP
:)
Lee Weiner - 07 Jun 2006 03:49 GMT
>Hi,
>
[quoted text clipped - 4 lines]
>installation. All of my users a guaranteed to have java installed on
>their machines.
If all your users have Java installed, then the file association already
exists. The installation of the JRE creates the file association in the
registry. You simply put a shortcut to the jar file on the desktop or menu
system and click it.
Lee Weiner
lee AT leeweiner DOT org
Andrew T. - 07 Jun 2006 04:13 GMT
..
> ... I would like my small group of users to
> simply be able to click an a .exe file or a .bat without an additional
> installation. All of my users a guaranteed to have java installed on
> their machines.
JWS (Java WebStart) is the easiest for end users.
HTH
Andrew T.
Luc The Perverse - 07 Jun 2006 04:35 GMT
> ..
>> ... I would like my small group of users to
[quoted text clipped - 3 lines]
>
> JWS (Java WebStart) is the easiest for end users.
But has some downsides
--
LTP
:)
dimitar - 07 Jun 2006 13:02 GMT
> But has some downsides
I'm willing to hear about these.
Can anybody recommend another 1 click deployment tool for Java?
I have an app which I consider to migrate to Webstart. It's already
packaged in signed jars and requires the following permissions:
- establish a few socket connections.
- read/write to user's preference store.
- write to temp file system.
- load native code (the SWT libraries).
Right now the user has to download a package, unzip it in an empty
directory and click on the right file. The target scenario is that an
user would receive a link in his email, click it and the application
will start, adding a new icon in his start menu as well.
Dimitar
Luc The Perverse - 07 Jun 2006 20:43 GMT
>> But has some downsides
>
> I'm willing to hear about these.
http://mindprod.com/jgloss/javawebstart.html
--
LTP
:)
Andrew T. - 08 Jun 2006 11:16 GMT
..
> I have an app which I consider to migrate to Webstart. It's already
> packaged in signed jars and requires the following permissions:
[quoted text clipped - 3 lines]
> - write to temp file system.
> - load native code (the SWT libraries).
Given the code is already signed, it will be easy to request
full permissions (your only option here) in the JNLP file.
> Right now the user has to download a package, unzip it in an empty
> directory and click on the right file.
Ick..
>..The target scenario is that an
> user would receive a link in his email, click it and the application
> will start, adding a new icon in his start menu as well.
You can also suggest a desktop icon or menu item for the
app., the user gets to choose if they actually want it.
(the best of all worlds.)
( And JWS allows easy update of the application or JRE. Sweet. )
Andrew T.
Steve Sobol - 07 Jun 2006 05:36 GMT
> How can I distribute a java aplication as a .exe file? I've read about
> executable jars, but those require either a command or the right
> association for the jar files. I would like my small group of users to
> simply be able to click an a .exe file or a .bat without an additional
> installation. All of my users a guaranteed to have java installed on
> their machines.
http://launch4j.sf.net/
works quite well, has lots of options including a splash screen option, and
is open-source.

Signature
Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Apple Valley, California PGP:0xE3AE35ED
It's all fun and games until someone starts a bonfire in the living room.
TechBookReport - 07 Jun 2006 10:02 GMT
> Hi,
>
[quoted text clipped - 8 lines]
>
> Aaron Fude
You might want to take a look at jSmooth: http://jsmooth.sourceforge.net/

Signature
TechBookReport Java http://www.techbookreport.com/JavaIndex.html