easily making executables, installers, debs, etc.

Discussion in 'Java' started by fft1976, Apr 15, 2009.

  1. fft1976

    fft1976 Guest

    Are there tools for easily creating installers from jars for various
    platforms? Ideally, the installers would be native and would check
    whether jvm is installed and do something user-friendly if it's not.
    fft1976, Apr 15, 2009
    #1
    1. Advertising

  2. On Apr 15, 7:05 pm, fft1976 <> wrote:
    > Are there tools for easily creating installers from jars for various
    > platforms?


    JWS*.

    >..Ideally, the installers would be native and would check
    > whether jvm is installed and do something user-friendly if it's not.


    deployJava.js*.

    * if it has a GUI.

    --
    Andrew T.
    pscode.org
    Andrew Thompson, Apr 15, 2009
    #2
    1. Advertising

  3. fft1976

    Guest

    On Apr 15, 12:01 pm, Andrew Thompson <> wrote:
    > On Apr 15, 7:05 pm, fft1976 <> wrote:
    >
    > > Are there tools for easily creating installers from jars for various
    > > platforms?


    If you're targetting Mac users then these users will expect
    your Java app to be packaged in the same way as most Mac
    application are packaged.

    Apple recommends Java apps to be shipped as a .dmg file for
    OS X users.

    JarBundler can be used on OS X to that effect.

    I'm working on an app that is deployed on countless of
    various different configs. For Linux and Windows it's
    a unique .jar (with jars packaged inside the .jar) while
    for OS X we package our application in the way recommended
    by Apple: in a .dmg file.
    , Apr 15, 2009
    #3
  4. In article
    <>,
    wrote:

    > On Apr 15, 12:01 pm, Andrew Thompson <> wrote:
    > > On Apr 15, 7:05 pm, fft1976 <> wrote:
    > >
    > > > Are there tools for easily creating installers from jars for
    > > > various platforms?

    >
    > If you're targetting Mac users then these users will expect
    > your Java app to be packaged in the same way as most Mac
    > application are packaged.
    >
    > Apple recommends Java apps to be shipped as a .dmg file for
    > OS X users.
    >
    > JarBundler can be used on OS X to that effect.
    >
    > I'm working on an app that is deployed on countless of
    > various different configs. For Linux and Windows it's
    > a unique .jar (with jars packaged inside the .jar) while
    > for OS X we package our application in the way recommended
    > by Apple: in a .dmg file.


    This is good advice. A bare JAR works fine on Mac OS X, but only modest
    effort is required to wrap the archive as an application with JarBundler
    and package it with DiskUtility. Alternatively, both .app and .dmg can
    be constructed via build.xml:

    <http://robotchase.svn.sourceforge.net/viewvc/robotchase/trunk/>

    Java Web Start is a more compelling choice for target platforms that
    lack a vendor-supplied JVM, but it works fine on Mac OS X, which does:

    <http://robotchase.sourceforge.net/RobotChase.jnlp>

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
    John B. Matthews, Apr 15, 2009
    #4
  5. fft1976

    fft1976 Guest

    On Apr 15, 4:01 am, Andrew Thompson <> wrote:
    > On Apr 15, 7:05 pm, fft1976 <> wrote:
    >
    > > Are there tools for easily creating installers from jars for various
    > > platforms?

    >
    > JWS*.
    >
    > >..Ideally, the installers would be native and would check
    > > whether jvm is installed and do something user-friendly if it's not.

    >
    > deployJava.js*.
    >
    > * if it has a GUI.


    I was talking about Java applications that seem native to the user
    (during installation) with no relation to the browser, i.e. *.msi for
    Windows users, *dmg (or whatever) for Mac users, *.tar.gz, *rpm and
    *.deb for Linux users.

    It would seem that the work that needs to be done packaging a pure
    Java application into these does not depend on the particular Java
    application very much, except for minor configuration details. So I
    expected this processes to have been streamlined already.
    fft1976, Apr 15, 2009
    #5
  6. On 2009-04-15 05:05:40 -0400, fft1976 <> said:

    > Are there tools for easily creating installers from jars for various
    > platforms? Ideally, the installers would be native and would check
    > whether jvm is installed and do something user-friendly if it's not.


    For .deb, I'd consider using the deb-maven-plugin from Codehaus:
    <http://mojo.codehaus.org/deb-maven-plugin/using-deb.html>

    However, I've never used it so I can't speak for how well it
    does/doesn't work, and if you're not already using maven, the migration
    may be more than you want to bite off. The biggest gotcha that I can
    spot is related to generated dependencies: I'm not sure how well its
    autoGenerateDepends directive works, so do some experiments.

    There is a similar plugin for RPMs:
    <http://mojo.codehaus.org/rpm-maven-plugin/>

    I don't see an MSI plugin floating around, either on codehaus or
    anywhere else. Java programs are pretty close to xcopy-installable by
    default, unless you have strange beliefs about installing JARs
    "globally" to the system -- don't do that, it's against the grain of
    Java's deployment model in practice. Both Redhat and Debian have gone
    to a lot of lengths to fake global library installation, but even with
    all the manpower spent, it's not great.

    Building a Mac .app bundle is probably better done through the assembly
    plugin, since Java .apps are little more than directory trees. Details
    on the correct structure are available online:

    <http://developer.apple.com/documentation/Java/Conceptual/Java14Development/03-JavaDeployment/JavaDeployment.html#//apple_ref/doc/uid/TP40001885-208447-TPXREF120>


    (<http://tinyurl.com/ct2mlg>)

    As for the assembly plugin itself, the documentation for it is at:
    <http://maven.apache.org/plugins/maven-assembly-plugin/>

    To bundle it up as a .dmg, you'll need to run something like
    $ hdiutil create -srcfolder root-of-distribution my-project-1.0.dmg
    $ hdiutil internet-enable -yes my-project-1.0.dmg

    (The internet-enable step is semi-optional but I do wish more DMGs
    would use it.)

    For a few bucks I'd be happy to write and release as open source a
    maven plugin that ties together the steps in building a complete .dmg
    from a JAR project; it's not hard, but it's not something I
    particularly care about doing ferfree. :)

    HTH.

    -o
    Owen Jacobson, Apr 16, 2009
    #6
  7. fft1976

    Mark Space Guest

    fft1976 wrote:

    >
    > I was talking about Java applications that seem native to the user
    > (during installation) with no relation to the browser, i.e. *.msi for
    > Windows users, *dmg (or whatever) for Mac users, *.tar.gz, *rpm and
    > *.deb for Linux users.



    I believe most standard windows installers can be customized to install
    Java programs, although I haven't tried it. This one advertised
    explicit support for Java:

    http://www.advancedinstaller.com/java.html


    Here are a few ones specific to Java. I haven't tested any of them.

    <http://java-source.net/open-source/installer-generators>
    Mark Space, Apr 16, 2009
    #7
  8. fft1976

    fft1976 Guest

    On Apr 15, 9:48 pm, Owen Jacobson <> wrote:

    [...]

    It's possible to make installers for various platforms, and it's not
    TOO difficult. The problem is that there are MANY of them, also user
    friendliness is an issue. What will the installer do if there is no
    JVM? Native binary splash screen while the JVM is starting, etc.?

    After searching the net for a while, I realized that the only tool
    that claims to have the features I want is a commercial one,
    install4j, and is rather pricey at $1200/developer, but probably pays
    for itself in the productivity saved, assuming its quality is good.

    Strange that Sun, IBM or the open-source community haven't solved this
    for Java yet.
    fft1976, Apr 16, 2009
    #8
  9. On 2009-04-16 01:30:18 -0400, fft1976 <> said:

    > On Apr 15, 9:48 pm, Owen Jacobson <> wrote:
    >
    > [...]
    >
    > It's possible to make installers for various platforms, and it's not
    > TOO difficult. The problem is that there are MANY of them, also user
    > friendliness is an issue. What will the installer do if there is no
    > JVM? Native binary splash screen while the JVM is starting, etc.?
    >
    > After searching the net for a while, I realized that the only tool
    > that claims to have the features I want is a commercial one,
    > install4j, and is rather pricey at $1200/developer, but probably pays
    > for itself in the productivity saved, assuming its quality is good.
    >
    > Strange that Sun, IBM or the open-source community haven't solved this
    > for Java yet.


    That's also highly platform-dependent. The only OS where it's even an
    issue is Windows, though:
    - .deb and .rpm files can declare dependencies on the Debian/Ubuntu
    and Redhat Java meta-packages, which the respective package managers
    can deal with.
    - OS X has a 1.5 JVM pre-installed; 1.6 is also available via the
    platform's software updater for 64-bit CPUs. Apps do not install JVMs.
    - Windows doesn't have either a preinstalled or a standard package for
    the JVM, so you need to include the Java MSI in your own and offer to
    install it if it's not already installed. I haven't read the license,
    so I don't even know whether this is actually allowed.

    -o
    Owen Jacobson, Apr 16, 2009
    #9
  10. fft1976

    Roedy Green Guest

    On Wed, 15 Apr 2009 02:05:40 -0700 (PDT), fft1976 <>
    wrote, quoted or indirectly quoted someone who said :

    >Are there tools for easily creating installers from jars for various
    >platforms? Ideally, the installers would be native and would check
    >whether jvm is installed and do something user-friendly if it's not.


    see http://mindprod.com/jgloss/installer.html for your many options.
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com

    Now for something completely different:
    http://www.youtube.com/watch?v=9lp0IWv8QZY
    Roedy Green, Apr 16, 2009
    #10
  11. fft1976

    Guest

    On Apr 16, 12:55 pm, Owen Jacobson <> wrote:
    > On 2009-04-16 01:30:18 -0400, fft1976 <> said:

    ....
    > - Windows doesn't have either a preinstalled...


    I don't disagree with what you're saying but actually a lot
    of OEM Windows PCs are packaged with Java pre-installed.

    Most laptops (> 50% of PC sales), all Dells, etc. ship
    with Java pre-installed.
    , Apr 16, 2009
    #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. CuriousGeorge

    Binaries and installers

    CuriousGeorge, Mar 24, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    407
    Jeffrey Tan[MSFT]
    Mar 27, 2006
  2. Dhruba Bandopadhyay

    HELP: Installshield-like installers

    Dhruba Bandopadhyay, May 4, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    403
    Vadym Stetsyak
    May 5, 2006
  3. Brian Elmegaard

    distutils for non-python windows installers

    Brian Elmegaard, Oct 27, 2004, in forum: Python
    Replies:
    3
    Views:
    426
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Oct 29, 2004
  4. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    368
    Fredrik Lundh
    Aug 13, 2008
  5. Michael Schuerig

    Debian: coexistence of debs and gems?

    Michael Schuerig, May 4, 2005, in forum: Ruby
    Replies:
    4
    Views:
    118
    Michael Schuerig
    May 5, 2005
Loading...

Share This Page