LibreOffice requires Oracle's JDK on Mac OS X

I am trying to create my first macro with LibreOffice version 6.1.6.3 on a MacBook Pro running Mac OS X 10.14.5. When I select menu item “Tools | Macros | Run Macro” I get this popup box: “LibreOffice requires Oracle’s Java Development Kit (JDK) on Mac OS X 10.10 or greater to perform this task. Please install them and restart LibreOffice.” However, the title of the popup box is “JRE Required”.

I found a potential answer to this problem in the question “Mac Java problem when creating a database” but the detailed directions talk about installing the JDK. The error messages I got in the popup implied that I need both the JDK and the JRE.

When I install the JDK will I also get a copy of the JRE? What are the current instructions for installing the needed Oracle libraries if I want to use macros?

Thanks, bobby

When I install the JDK will I also get a copy of the JRE?

Yes. As I understand, Oracle doesn’t provide a JRE alone. Sorry, I can’t give any other pointer as I don’t use Mac.

@gabix There is a JRE for Mac OS X (current versions filename is jre-8u221-macosx-x64.dmg), but LibreOffice can’t deal with that.

I meant the current Java, not the old Java 8.

FAQ-using_macOS

E-bot, why not repost it as an answer?

Since I work with Windows and not with Mac, I only saw it as an additional hint. And the question was already marked as solved. If it still helps, so much the better. Have all your joy in it.

I get the same error warning message every time I start a program. I’ve tried everything if it’s at the recommended level, but I’m still getting the foal. I installed mac os 13.5 version and latest version of java. I intend to use zotero but I can’t use.

LibreOffice requires Oracle’s Java Development Kit (JDK) on macOS 10.10 or greater to perform this task. Please install them and restart LibreOffice. Frequently asked questions - General - The Document Foundation Wiki

Hello,

yes - a JDK contains a JRE as well. Please read this FAQ and get your JDK from here - Please note: Oracle license grants usage at no cost for private, non-commercial usage only. There are alternatives like OpenJDK (Download), which in many cases don’t provide support of operating system’s installation method (e.g. OpenJDK doesn’t provide a .dmg file for Max OS X’s own installation method but a tar.gz, which you need to extract and place to a proper directory on your own).

Instruction to install (as usual in Max OS X)

  • Download from Oracle
  • Double click on the .dmg file
  • Follow any instructions
  • Open LibreOffice
  • Go to LibreOffice -> Preferences -> LibreOffice -> Advanced
  • Tick option Use a java runtime environment
  • Check the dialog is showing information according to screenshot (Of course your version may differ). Especially watch for the “Location” right above Option Features. Perhaps you may choose your location accordingly, if you are going for one of the alternatives to Oracle’s Java release.

Opaque, thank you for your directions. I don’t anticipate any problems now.
bobby