Re: Java Custom JRE Support (Extensions)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16/09/2019 13:42, Rob Barry wrote:
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.

Not sure what "the standard/suggested JRE download for windows" would be. But note that LO runs the JVM in-process in its own soffice.bin process, so for a 32-bit LO installation the user needs to obtain a 32-bit JRE, while for a 64-bit LO installation they need to obtain a 64-bit JRE.

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?

There are no such plans by anyone I'm aware of at least. As above, LO uses a single in-process JVM for all of its Java needs (from extensions and from whatever core components that use Java).

_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux