Producing "bundled" JREs for other platforms?

org.openjdk at io7m.com org.openjdk at io7m.com
Sun Jul 24 21:06:59 UTC 2016


'Lo.

On 2016-07-24T21:50:48 +0100
Alan Bateman <Alan.Bateman at oracle.com> wrote:
> jlink produces a run-time image for a specific platform. There are a few 
> rough edges when it comes to cross targeting but it should work, you 
> just specify the location of the packaged modules for the target platform.

Got it.

> However if read your mail correctly then you seem to be looking for a 
> "universal binary". I can't quite tell if you are looking to 
> redistribute a run-image or not, the above suggests you must be picking 
> that up from whatever is on the platform already.

I'm not entirely sure what I'm looking for right now, just looking at
what Jigsaw provides, really.

My overall goal with distributing software that I've written is to have
one single distributable package that runs on as many platforms as
possible. I suppose that does sort of fit the notion of a "universal
binary".

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.

M


More information about the jigsaw-dev mailing list