Executable jar

  • Thread starter jennifereden.price
  • Start date
J

jennifereden.price

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
 
J

Jason in Colorado

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.
 
L

Luc The Perverse

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.

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.
 
L

Lee Weiner

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.

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
 
A

Andrew T.

... 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.
 
S

Steve Sobol

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.
 
T

TechBookReport

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

You might want to take a look at jSmooth: http://jsmooth.sourceforge.net/
 
D

dimitar

Luc said:
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
 
A

Andrew T.

dimitar wrote:
...
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).

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top