How LibreOffice load a service from a Java JAR

Miklos Vajna vmiklos at collabora.com
Wed Jan 29 08:18:56 UTC 2025


Hi Pierre,

On Tue, Jan 28, 2025 at 06:11:20PM +0100, Pierre Vacher <prrvchr at gmail.com> wrote:
> I would like to see the code that allows to load a UNO service that we
> added to the UNO API by a Java JAR file through for example an extension.
> The goal is to know how the Java JAR archive is loaded.

I think the idea is that code can create an instance of an UNO service,
and that may happen to be implemented in Java.

> I searched for *RegistrationHandler* in the source code but it does not
> give anything?

Assuming your Java extension sets a RegistrationClassName in the
manifest, it seems this is handled here on the Java side:

ridljar/com/sun/star/comp/loader/RegistrationClassFinder.java

Also the extension handling code deals with this:

desktop/source/deployment/registry/component/dp_component.cxx

Hopefully that gets you started.

Regards,

Miklos


More information about the LibreOffice mailing list