Producing "bundled" JREs for other platforms?
Alan Bateman
Alan.Bateman at oracle.com
Sun Jul 24 20:50:48 UTC 2016
On 24/07/2016 21:22, org.openjdk at io7m.com wrote:
> :
> The way I distribute actual application code right now is that I have a
> directory structure with something like the following:
>
> application-1.0/
> lib/
> application.jar
> library0.jar
> library1.jar
> ...
> application.exe
> application.sh
> ...
>
> The "lib" directory contains the application jars and dependencies.
>
> "application.exe" is a Windows executable produced by launch4j or
> something similar, and "application.sh" is a shell script for
> Unix-likes that simply sets up the classpath based on the contents of
> "lib" and executes "java" with the main class as an argument.
>
> I don't currently have a more pleasant approach for OS X as Apple seem
> to continually break things and don't provide cross-platform tools for
> producing OS X "bundles".
>
> I'm basically trying to work out how Jigsaw will let me do something
> "better" than the above. As you can probably see, I strongly prefer
> providing a single application package that works on as many platforms
> as possible, with minimal platform-specific launchers for those
> platforms that need them (as opposed to offering separate Linux,
> Windows, OS X, etc, packages). I feel like I might be trying to do the
> opposite of what Jigsaw provides by default.
>
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.
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.
-Alan
More information about the jigsaw-dev
mailing list