LibreOffice Java JRE Settings and Requirements
LibreOffice utilizes a Java Runtime Environment (JRE) to execute several advanced functions, including database tools, specific wizards, and custom scripting frameworks. This guide outlines which features depend on Java, the configuration settings required within LibreOffice to enable them, architecture compatibility rules, and how to configure custom Java parameters and classpaths.
Features in LibreOffice That Require Java
While standard document editing in Writer, Calc, and Impress functions without Java, specific tools and advanced components require a working JRE:
- LibreOffice Base: The default embedded HSQLDB database engine, the Table and Query Wizards, and the Report Builder require Java. (The Firebird engine does not strictly require Java, but many Base utilities still do.)
- Document Wizards: Built-in wizards for creating letters, faxes, agendas, and converting documents to HTML.
- Macros and Scripting: Running or editing scripts written in BeanShell or JavaScript.
- Accessibility Frameworks: The Java-based Assistive Technology bridge on certain operating systems.
- Specialized File Filters: Specific XML filters, MediaWiki export tools, and third-party document transformation extensions.
Architecture and Version Requirements
To ensure proper communication between LibreOffice and the JRE, specific installation requirements must be met:
- Bit Architecture Match: The bitness of the JRE must match the bitness of the LibreOffice installation. A 64-bit LibreOffice requires a 64-bit JRE or Java Development Kit (JDK). A 32-bit LibreOffice requires a 32-bit JRE. Mismatched architectures will prevent LibreOffice from detecting the runtime.
- Supported Implementations: OpenJDK, Eclipse Temurin (Adoptium), Amazon Corretto, and Oracle JRE/JDK (version 8 or newer) are fully supported.
- macOS Specifics: macOS installations typically require a full JDK rather than a standalone JRE package for LibreOffice to detect the environment path.
Configuring Java Settings in LibreOffice
To configure the runtime environment in LibreOffice:
- Open LibreOffice and navigate to the Advanced settings:
- Windows / Linux: Go to Tools > Options > LibreOffice > Advanced.
- macOS: Go to LibreOffice > Preferences > LibreOffice > Advanced.
- Check the box labeled Use a Java runtime environment.
- Allow the software to populate the list of installed Java environments.
- Select the radio button next to the desired Java installation.
- If your installation does not appear automatically, click
Add… and manually browse to the directory where your
JRE or JDK is installed (for example,
/usr/lib/jvm/on Linux orC:\Program Files\Java\on Windows). - Click Apply, then click OK.
- Restart LibreOffice to apply the changes.
Advanced Java Parameters and ClassPath
For specialized use cases, such as connecting to external databases or allocating more memory to Java tasks, you can adjust additional settings within the same Advanced menu:
- Java Start Parameters: Click the
Parameters button to define command-line startup
parameters (e.g., entering
-Xmx1024mto increase the maximum memory heap allocated to Java operations). - ClassPath: Click the ClassPath
button to add external
.jarfiles or folders containing Java libraries. This is required when connecting LibreOffice Base to external databases (such as MySQL, PostgreSQL, or Oracle) via JDBC drivers.
Disabling Java
If you do not require database wizards, Java-based macros, or HSQLDB, you can uncheck Use a Java runtime environment in the Advanced options menu. Disabling Java reduces memory usage and eliminates startup prompts requesting a Java installation.