
Packr – Packages Java apps for distribution on Windows, Linux and Mac OS X - zdw
https://github.com/libgdx/packr
======
malanj
Java distribution is one of the biggest pains I've experienced in my
development career. In all its forms, whether than be an applet, a J2SE
application or J2EE enterprise deployment it always seems to be 10x harder
than it should be. Somehow the Java ecosystem manages to make it much harder
than it could be. If Sun had brought out a tool in the late 90's as simple as
Packr seems to be it could have made a huge difference in the popularity of
Java.

~~~
BHSPitMonkey
I doubt they would have been satisfied with the mechanism Packr uses. Packr
distributes a static copy of a JVM with every build, which results in some
less-than-desirable side effects:

\- The more apps you've obtained this way, the more copies of JVMs you have on
your hard drive.

\- These per-app JVMs aren't getting patched when the mainline JRE does.

In a lot of ways, this undermines the purpose of the way Java is structured.
If you're going to be statically compiling your product, why not use a more
suitable platform?

~~~
chii
You can easily distribute the JRE, but also autodetect if there is an existing
JRE installation, and use that instead.

Packaging a jvm is the right move for consumer apps. It's lower friction for
people downloading and using it, and harddrive space these days are dirt
cheap.

~~~
BHSPitMonkey
In that case, why not just have your installer check if Java is installed, and
install a shared JRE if it's not? This is the case with most .NET applications
I've had to install on Windows.

------
biscarch
I originally thought this was about Packer[1], just in case anyone else gets
confused.

[1]: [http://www.packer.io/](http://www.packer.io/)

~~~
Carrok
Also
/packer/:[http://dean.edwards.name/packer/](http://dean.edwards.name/packer/)

~~~
usagimaru
Don't forget about packer:
[https://github.com/keenerd/packer](https://github.com/keenerd/packer)

~~~
johnlinvc
For the ruby/node guys, pkgr do the same thing:
[http://pkgr.io/](http://pkgr.io/)

~~~
amalag
Wow I didn't know about this project, really amazing. I see they have packaged
Discourse which was a fairly complicated app.

------
Al-Khwarizmi
A good idea, but I would find even more useful a program that wrapped the jar
into an executable that:

\- If the user has a (sufficiently new) JVM installed in their system, or if
there is a JVM in the program's directory (see below), then it executes the
jar with that JVM,

\- Otherwise, shows a simple "OK/Cancel" dialog prompting the user to download
the JVM. Downloads it (to the program's directory without install, as in
packr) and runs the jar.

This would accomodate non-tech-savvy users without a JVM fine (and without
making them install Java in their system), while saving space for those that
already have Java.

I have been wanting this for years... I'd do it myself, if only I found the
time...

------
annnnd
I wonder if there are some legal ramifications to this. As far as I understand
Packr redistributes Sun/Oracle JRE - does license allow them to do that?

AFAIK JRE is under GPL, so it should be OK, but I am guessing Oracle still
retained some copyright? (I am genuinly curious - it's been a long time since
I touched non-Android Java)

~~~
chii
I m under the impression that sun (and oracle) lets you freely redistribute
the JRE runtime.

