Starting LibreOffice gives a warning in Java

When I start libreoffice writer i see warnings in the journal related to a java method

Jan 01 12:06:32 hpprol2 systemd[488582]: Started LibreOffice Writer - Traitement de texte.
Jan 01 12:06:37 hpprol2 libreoffice[530433]: WARNING: A restricted method in java.lang.System has been called
Jan 01 12:06:37 hpprol2 libreoffice[530433]: WARNING: java.lang.System::load has been called by com.sun.star.lib.util.NativeLibraryLoader in an unnamed module (file:/usr/lib64/libreoffice/program/classes/libreoffice.jar)
Jan 01 12:06:37 hpprol2 libreoffice[530433]: WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
Jan 01 12:06:37 hpprol2 libreoffice[530433]: WARNING: Restricted methods will be blocked in a future release unless native access is enabled

A search via google gives this advice “specify the correct javac arguments to enable native access without a warning”.
enable-native-access

This problem might only occur if a language other than English is used in libreoffice.
Can somebody confirm this before I enter a report in bugzilla?

Regards
Philippe

Hello and I wish you a happy new year,

I don’t see any such messages in my journal.
I am running Tumbleweed Xfce on X11.
My libreoffice version is 25.8.3.2-1.3. I have java-21-openjdk version 21.0.9.0-1.1 installed.

“Why” did you look in the journal logs? Did you see a warning or error pop-up when starting (or during use of) Writer?

1 Like

Hello,
I use KDE.
I regularly check the content of the log files via journalctl. What puzzles me is the remark

Restricted methods will be blocked in a future release....

These messages are only displayed when starting libreoffice via Dolphin ==> select and open an existing odt file.

Regards
Philippe

Even if I open an .odt-file in Writer through the file manager (Thunar on Xfce) I don’t get these journal messages.

It’s just warnings, no errors. Just ignore them. From what I’m seeing LO just works.

I absolutely agree with that statement!
Warnings are NOT errors.

Plus, as a “daily routine”, I never review the system logs unless something is rwong.

For curiosity, I fired up Leap 16 and then executed LibreOffice Writer … everything works … guess what - I don’t have Java installed on that system. Java is only required for specific functionality.

That refers to the future release of openjdk, not libreoffice. I guess it’s more a remark for the devs, not really relevant for users.
If you are interested in that: https://openjdk.org/jeps/472

So, like the others already said: it’s just warnings. Nothing to worry about.

Many thanks
Philippe

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.