RFR: JDK-8212780: JEP 343: Packaging Tool Implementation

Erik Joelsson erik.joelsson at oracle.com
Wed Oct 24 17:18:41 UTC 2018


Nice to see this finally happening!

Are we actually adding a new demo? I thought we were working towards 
getting rid of the demos completely.


The jdk.packager_CLEAN_FILES could be replaced with a simple 
"jdk.packager_CLEAN := .properties" unless you actually need to add all 
the platform specific files to builds for all platforms (which I 
doubt?). To clarify, the current patch will add all linux, windows and 
mac properties to builds of all OSes. Is that intended?


I would rather have the filter be conditional on an inclusive list of 
platforms. Other OpenJDK contributors are building for other OSes like 
AIX and we don't want to have to keep track of all those. The list of 
OSes that jpackager supports is well defined, so better check for those 


I believe the qualified export needs to be put in a 
module-info.java.extra file since we filter out the target module on 
unsupported platforms.


* Please use $$(call FindExecutableDirForModule, $$(MODULE)) for the 
DEST dir in the copy.
* Please adjust the indentation of the big windows/else blocks. We 
indent everything with 2 spaces in conditional blocks.
* A minor style nit on the copy-and-chmod macro, since it's meant to be 
used as a recipe, we usually indent those with tabs to indicate that 
they are recipe lines, in this case, one tab is enough even though the 
surrounding define should be indented with 2 spaces (don't combine tab 
and spaces here).
* The (new) SetupJdkExecutable macro handles VERSIONINFO_RESOURCE 
automatically for you unless you have specific needs. This looks like 
the defaults should be fine.
* Since this is just for windows, the TOOLCHAIN_LINK_CXX should not make 
any difference. (It's only needed for GCC to force linking with g++ 
instead of gcc) So please remove.
* You could consider using FindSrcDirsForComponent for the src dir.


* The native source files are not organized according to the standards 
introduced with JEP 201. If they were, most of these SetupJdkLibrary 
calls would automatically find the correct sources. I realize there is a 
special case for the windows papplauncherc executable as it's built from 
the same sources as papplauncher, so that will need a special case. 
Building of the executables should be moved to Launcher-jdk.packager.gmk 
* Why are you changing the build output dir and copying debuginfo files 
around? We have a standard way of building and places where files are 
put. If that is not working for you, we need to fix it on a global 
level. Having each native library being built differently is not good 
for maintainability.
* VERSIONINFO_RESOURCE is handled automatically so does not need to be 
* Please indent the full contents of logic blocks with 2 spaces. Not 
having proper indents makes it much harder to read the code.
* Several lines are too long for future side by side comparisons, please 
break them up. You can use the # lines as a soft guidance.


On 2018-10-24 07:22, Alan Bateman wrote:
> On 23/10/2018 16:49, Andy Herrick wrote:
>> This patch implements the Java Packager Tool (jpackager) as described 
>> in JEP 343: Packaging Tool 
>> <https://bugs.openjdk.java.net/browse/JDK-8200758>
>> jpackager is a simple packaging tool, based on the JavaFX 
>> |javapackager| tool, that:
>>  * Supports native packaging formats to give the end user a natural
>>    installation experience. These formats include |msi| and |exe| on
>>    Windows, |pkg| and |dmg| on MacOS, and |deb| and |rpm| on Linux.
>>  * Allows launch-time parameters to be specified at packaging time.
>>  * Can be invoked directly, from the command line, or programmatically,
>>    via the |ToolProvider| API.
>> Webrev:
>> http://cr.openjdk.java.net/~herrick/8212780/webrev.01/
> cc'ing build-dev as it's important to get it reviewed there.
> What is the plan for tests to go with this tool? I see there is one 
> test in the webrev to do some argument validation but I don't see 
> anything else right now.
> What is the status of the JNLPConverter tool? I see it is included as 
> a "demo" but maybe it would be better to host somewhere else as this 
> is for developers migrating Java Web Start applications.
> Would it be possible to update the JEP with all the CLI options? That 
> would be useful for review and also useful for those invoking it with 
> the ToolProvider API.
> If I read the webrev correctly then it adds two modules, one with the 
> jpackager tool and the other with an API. It would be useful to get a 
> bit more information on the split. Also I think the name of the API 
> module and the package that it exports needs discussion to make sure 
> that the right names are chosen.
> -Alan

More information about the core-libs-dev mailing list