jlink cross-targeting

Sander Mak sander.mak at luminis.eu
Wed Aug 24 20:53:24 UTC 2016


Based on:

On 2016-07-24T21:50:48 +0100
Alan Bateman <Alan.Bateman at oracle.com<mailto: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.

I thought I'd fire up a Windows VM, running on an OSX host. Downloaded the win32 jigsaw-ea build to the host, pointed host's jlink at the win32 jmods directory and created a runtime image targeting Windows. After moving this image from the host to the windows VM, running bin/java.exe resulted in:

Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

I verified that the java.dll mentioned is available in the image's lib directory.

For good measure, I re-created the image on Windows itself using jlink from the same win32 jigsaw-ea build. This image worked flawlessly.

Is this one of the 'rough' edges mentioned above I'm running into, or am I missing a trick to make the cross-targeting work on OSX with a win32 JDK?


More information about the jigsaw-dev mailing list