Java Custom JRE Support (Extensions)

Rob Barry rob+libreoffice at muishkin.co.uk
Mon Sep 16 11:48:01 UTC 2019


Hi All,

I've been developing an extension for LibreOffice in Java and have defaulted to targeting the v1.8
JDK. 

One issue I've noticed with this is that LibreOffice on Windows requires the x64 JRE in order to
execute the extension. Given this is not the standard/suggested JRE download for windows it adds a
bit of complication when a user attempts to install the extension.

One way I thought this could be fixed is to use the jlink (
https://docs.oracle.com/en/java/javase/11/tools/jlink.html + 
https://blog.idrsolutions.com/2017/05/java-9-jlink-explained-in-5-minutes/) functionality which the
JDK v9 ships with. Broadly speaking this allows the developer to create a custom JRE for the
application which contains a sub-set of the modules contained in the standard JRE (so it's more
performant + uses less memory). I've also read suggestions that Java development will be moving
further in this direction with standard JREs not shipped by Oracle at all. 

"Developers who deploy desktop applications to individual consumers (eg, games, personal banking, or
other B2C applications) will need to transition to other deployment technologies such as the jlink
and/or third party packaging and deployment solutions before the end of 2020." - 
https://www.oracle.com/technetwork/java/javase/javaclientroadmapupdate2018mar-4414431.pdf

This leads to my question: does LibreOffice have any support for the use of jlink custom-built JREs
to build extensions?  Alternatively, are there any plans to support this in future?

-- 
Thanks,

Rob



More information about the LibreOffice mailing list