jpackage current status

Michael Hall mik3hall at
Sat Feb 22 15:32:11 UTC 2020

> On Feb 21, 2020, at 11:18 AM, Michael Hall <mik3hall at> wrote:
>> On Feb 21, 2020, at 11:12 AM, Kevin Rushforth <kevin.rushforth at> wrote:
>> I doubt this has anything to do with jpackage being in incubator or not. Fundamentally, just copying binary launchers into another JDK image like you are doing is only going to work by accident, if it works at all. If you need jpackage (or javac or jar or ...) to be in a JDK image, then you should jlink it yourself, include all of the modules you need, and don't strip the executables.
>> -- Kevin
> I was doing that for applications going back to before jlink - application build tools have not handled this real consistently and often just strip. Possibly now you are correct. jpackage does use jlink though? So why would my own be better than what the tool does? I believe I showed the module is present in the runtime in use. 
> But again doing jlink separately might in this instance be the best practice. I will try it.

Well this went a little wrong and is sort of getting messed up.
I tried a jlink jre. The app froze (OS X) and had to be force quit.
Left it at that for the time being.
This morning Eclipse won’t start.

Double clicking the app executable shows…

/Users/mjh/java-2019-06/ ; exit;
Error: could not find libjava.dylib
Failed to GetJREPath()

I tried falling back to the previous ea. 
java -version
openjdk version "14-ea" 2020-03-17

But same thing.

Some searching seems to be showing this as the problem here… <>
For both versions. Current and earlier ea libjli.dylib appears to be both in the lib and MacOS directories.

I will probably try reinstalling Eclipse with the earlier ea in JavaVirtualMachines. A setup that had been working.

Just to mention something else a little off that needs working around although I don’t think it should mess anything up. Some of these commands are still not default available on OS X. No jpackage of course, but no jlink either. jdeps is there but I don’t remember if I added a link myself or not there. 

For jpackage and jlink I do this…


	--input ../ \
	--icon GenericApp.icns \   

The entire jlink is…

${LINKER}  --strip-debug --no-header-files --no-man-pages \
	   --bind-services \
	   --add-modules java.compiler,java.desktop,java.logging,,java.prefs,,java.rmi,java.scripting,java.sql,java.xml,jdk.attach,jdk.jshell,,jdk.incubator.jpackage \
	   --output runtime

Trying to follow the defaults indicated for jpackage.

More information about the core-libs-dev mailing list