Producing "bundled" JREs for other platforms?

Alan Bateman Alan.Bateman at oracle.com
Mon Jul 25 07:22:55 UTC 2016


On 24/07/2016 22:06, org.openjdk at io7m.com wrote:

> :
> The arrangement that I described in the previous email is good in the
> sense that 99% of the distributed package is platform-independent code
> that's shared between all supported platforms. The platform-specific
> parts are limited to tiny launcher executables. Even better, if I
> haven't provided any sort of launcher for a platform, a technologically
> competent user on that platform can get my program to run with a
> little work: I'm providing the code as platform-independent jar files
> and the user can simply pass them to whatever JVM they're using.
>
>  From what I can see, Jigsaw's images would actually be a step backwards
> here. It seems like I would still need to provide platform-specific
> launcher executables, and even worse, the very process of creating
> images would eliminate any sharing of compiled code between platforms.
> I could distribute a single package that contains images for different
> platforms, but it would contain a lot of duplicated compiled code and
> would effectively limit the package to running on only those platforms
> for which images have been produced.
The difference is that the application that you are distributing doesn't 
appear to bundle the JRE, I assume it makes use of whatever JRE or JDK 
is on the system.

You might want to look at the javapackager [1], updated in JDK 9 to 
support modules and jlink (JEP 275 [2]).

-Alan.

[1] 
https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html
[2] http://openjdk.java.net/jeps/275


More information about the jigsaw-dev mailing list