Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > easily making executables, installers, debs, etc.

Reply
Thread Tools

easily making executables, installers, debs, etc.

 
 
fft1976
Guest
Posts: n/a
 
      04-15-2009
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.
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      04-15-2009
On Apr 15, 7:05*pm, fft1976 <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
 
cbossens73@yahoo.fr
Guest
Posts: n/a
 
      04-15-2009
On Apr 15, 12:01 pm, Andrew Thompson <(E-Mail Removed)> wrote:
> On Apr 15, 7:05 pm, fft1976 <(E-Mail Removed)> 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.


 
Reply With Quote
 
John B. Matthews
Guest
Posts: n/a
 
      04-15-2009
In article
<(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> On Apr 15, 12:01 pm, Andrew Thompson <(E-Mail Removed)> wrote:
> > On Apr 15, 7:05 pm, fft1976 <(E-Mail Removed)> 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>
 
Reply With Quote
 
fft1976
Guest
Posts: n/a
 
      04-15-2009
On Apr 15, 4:01*am, Andrew Thompson <(E-Mail Removed)> wrote:
> On Apr 15, 7:05*pm, fft1976 <(E-Mail Removed)> 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.
 
Reply With Quote
 
Owen Jacobson
Guest
Posts: n/a
 
      04-16-2009
On 2009-04-15 05:05:40 -0400, fft1976 <(E-Mail Removed)> 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

 
Reply With Quote
 
Mark Space
Guest
Posts: n/a
 
      04-16-2009
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>
 
Reply With Quote
 
fft1976
Guest
Posts: n/a
 
      04-16-2009
On Apr 15, 9:48*pm, Owen Jacobson <(E-Mail Removed)> 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.
 
Reply With Quote
 
Owen Jacobson
Guest
Posts: n/a
 
      04-16-2009
On 2009-04-16 01:30:18 -0400, fft1976 <(E-Mail Removed)> said:

> On Apr 15, 9:48*pm, Owen Jacobson <(E-Mail Removed)> 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

 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      04-16-2009
On Wed, 15 Apr 2009 02:05:40 -0700 (PDT), fft1976 <(E-Mail Removed)>
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: A fresh new approach to making making online Fakename Computer Information 0 11-18-2005 02:10 AM
Making new Flavors : Making a custom transferhandler for and drop applications ebby83@gmail.com Java 5 01-12-2005 11:10 AM
Code this more easily? John ASP .Net 0 06-01-2004 07:58 AM
Easily create a querystring on the fly? David ASP .Net 5 11-21-2003 06:32 AM
Funny Behaviour -- Probably Easily Answered Ron ASP .Net 2 06-25-2003 08:41 PM



Advertisments