Executable jar

Discussion in 'Java' started by jennifereden.price@gmail.com, Jun 7, 2006.

  1. Guest

    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
    , Jun 7, 2006
    #1
    1. Advertising

  2. 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?
    Jason in Colorado, Jun 7, 2006
    #2
    1. Advertising

  3. <> wrote in message
    news:...
    > 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.

    --
    LTP

    :)
    Luc The Perverse, Jun 7, 2006
    #3
  4. Lee Weiner Guest

    In article <>, wrote:
    >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
    Lee Weiner, Jun 7, 2006
    #4
  5. Andrew T. Guest

    wrote:
    ...
    > ... 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.
    Andrew T., Jun 7, 2006
    #5
  6. "Andrew T." <> wrote in message
    news:...
    >
    > wrote:
    > ..
    >> ... 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.
    >


    But has some downsides

    --
    LTP

    :)
    Luc The Perverse, Jun 7, 2006
    #6
  7. Steve Sobol Guest

    wrote:

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

    --
    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.
    Steve Sobol, Jun 7, 2006
    #7
  8. wrote:
    > 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/

    --
    TechBookReport Java http://www.techbookreport.com/JavaIndex.html
    TechBookReport, Jun 7, 2006
    #8
  9. dimitar Guest

    Luc The Perverse wrote:
    > 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
    dimitar, Jun 7, 2006
    #9
  10. Luc The Perverse, Jun 7, 2006
    #10
  11. Andrew T. Guest

    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.
    Andrew T., Jun 8, 2006
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arnold Peters
    Replies:
    0
    Views:
    565
    Arnold Peters
    Jan 5, 2005
  2. muttley
    Replies:
    0
    Views:
    2,715
    muttley
    Oct 20, 2005
  3. cyberco
    Replies:
    4
    Views:
    3,748
    Roedy Green
    Feb 14, 2006
  4. Arnold Peters
    Replies:
    0
    Views:
    654
    Arnold Peters
    Jan 5, 2005
  5. Jason Cavett
    Replies:
    8
    Views:
    616
    Sanjay
    May 16, 2007
Loading...

Share This Page