Troubleshooting Open/LibreOffice and Java

Home made tutorials, by users, for users
Forum rules
No question in this section please
For any question related to a topic, create a new thread in the relevant section.
Locked
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Troubleshooting Open/LibreOffice and Java

Post by Villeroy »

Windows
On a 64-bit Windows system you've got to install a 32-bit Java because OpenOffice for Windows is a 32-bit application. There is nothing wrong with installing as many Java runtimes as needed to run all your applications.
At the time of writing, this is the link from where you can download a Java Runtime Environment that differs from the automatically suggested download (e.g. Windows 64-bit): https://java.com/en/download/manual.jsp
The JDK (development kit) for Java developers can be used as well but it is a much bigger download.
http://www.java.com/en/download/manual.jsp <br />The one and only Windows JRE that interfaces with a 32-bit program such as OpenOffice is marked with a red border.
http://www.java.com/en/download/manual.jsp
The one and only Windows JRE that interfaces with a 32-bit program such as OpenOffice is marked with a red border.
LibreOffice 5 for Windows is availlable as 32-bit and 64-bit application, so you don't need additional 32-bit Java for a 64-bit LibreOffice 5.

Edit 2022-03-12: https://adoptopenjdk.net/ provides Java runtimes for all platforms 32-bit and 64-bit

Combinations of Windows, Java and Open/LibreOffice:
64-bit Java on 64-bit machine: C:\Program Files\... works with 64-bit LibreOffice
32-bit Java on 64-bit machine: C:\Program Files (x86)\... works with OpenOffice and 32-bit LibreOffice
32-bit Java on 32-bit machine: C:\Program Files\... works with any installable office
64-bit software on 32-bit machine: impossible to install

The "Visual C++ Runtime" by Microsoft needs to be updated to the most recent version. This is also recommended for countless other applications regardless of the programming language.
http://www.microsoft.com/en-us/download ... px?id=5555 (32 bit aka "x86")
http://www.microsoft.com/en-us/download ... x?id=14632 (64 bit)

MacOS only at the time of writing (2015-03-18)
Recent versions of AOO and LO for the Mac are 64-bit versions anyway. If you encounter problems with the latest Java 8, make sure that you have the original MacOS version of Java 6 installed. Reference: https://bz.apache.org/ooo/show_bug.cgi?id=126130#c20

Linux
Install the JRE package of your distribution and any office suite which matches the bitness of your system.

All platforms:
There is a glitch in the Java section of the OpenOffice options dialog. When you select the right Java version from a list box with leading radio buttons, you've got to take care that you actually click the radio button within the list box. Just clicking the list box entry does not select anything.
After clicking the first entry, the last entry with the checked radio button remains the actually chosen one.
After clicking the first entry, the last entry with the checked radio button remains the actually chosen one.
 Edit: 2015-07-19: The major glitch with that list box is that it lists incompatible JREs among the compatible ones, particularly it lists 64-bit JREs that are incompatible with OpenOffice on Windows. Below the box you see the path of the currenly selected JRE. The path of a 32-bit JRE on a 64-bit Windows system usually starts with "C:\Program Files (x86)\" whereas the 64-bit JREs are stored under "C:\Program Files\". This is not a problem with 32-bit Windows systems where you can install 32-bit software only. The program path of a 32-bit Windows always starts with "C:\Program Files\" 
Last edited by Villeroy on Sat Mar 12, 2022 10:36 am, edited 15 times in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
esperantisto
Volunteer
Posts: 578
Joined: Mon Oct 08, 2007 1:31 am

Re: Troubleshooting OpenOffice and Java

Post by esperantisto »

Villeroy wrote:If you really need Java with OpenOffice (most people don't)…
I have to point that Java is required by certain AOO extensions, notably, by LanguageTool grammar checker. So, some users simply may not realize that they need JRE :-)

Thanks for the tutorial!
AOO 4.2.0 (of 2015) / LO 7.x / Win 7 / openSUSE Linux Leap 15.4 (64-bit)
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Troubleshooting OpenOffice and Java

Post by Villeroy »

esperantisto wrote:
Villeroy wrote:If you really need Java with OpenOffice (most people don't)…
I have to point that Java is required by certain AOO extensions, notably, by LanguageTool grammar checker. So, some users simply may not realize that they need JRE :-)

Thanks for the tutorial!
Thank you for this important addition. So we have certain extensions programmed in Java.

Then we have some wizards under menu:File>Wizards... When I turn off the use of Java the folloing wizards don't work anymore:
menu:File>Wizard>Letter...
menu:File>Wizard>Fax...
menu:File>Wizard>Agenda...
menu:File>Wizard>Web Page...
The other wizards seem to work.
In LibreOffice 5 the above wizards do not depend on Java anymore

The XML filters specified in menu:Tools>"XML Filter Settings ..." rely on Java. The export filters convert ODF into other XML flavours, import filters convert foreign XML flavours (such as Microsoft's infamous document XML of 2003) to ODF.

Finding keywords in the F1 help depends on Java. Also when hitting F1 with the cursor on a Basic keyword in the Basic IDE.
In LibreOffice 5 search by keywords does not depend on Java anymore

The following refers to bug https://issues.apache.org/ooo/show_bug.cgi?id=86541
Under menu:Tools>Macros... there is a "Run" dialog which requires Java (edit: no longer in LibreOffice 7). This one can be bypassed via Tools>Macros>Basic... button [Run]
There is a very annoying bug when you try to assign script events in Tools>Customize... tab "Events", button "Modify". You get a bunch of "missing Java errors" (one per macro library?) and when you cancel all the error messages you can successfully assign your macros anyway. Of course, the functionality of any non-Java language must not depend on any Java being installed on the system but something "in the background" tries to call some Java code when you are going to assign non-Java code to events. The same non-error is misleadingly raised when you try to assign macros to document objects such as form controls, spreadsheet tabs etc. You can do all this. But first you've got to cancel all the error messages.

Finally we have the Base component which is mostly functional without Java when the Base document is connected to a non-Java database and when the database developer abstains from the mostly useless Base wizards. The user of an input form will not notice any difference.
Having a non-Java database backend, the query designer and the plain the SQL editors are fully functional. Forms can be built perfectly well (much better forms than the lousy wizard can do). The old fashioned reports (Writer tables embedded in the Base documents) can be run by the end user but not built because the wizard to build the reports is written in Java. The new style reports from the "Report Builder Extension" need Java anyway. The Base part which makes it possible to create serial letters, labels, bibliographies and the like from spreadsheets, text files and non-Java databases is fully functional without Java.
A self-contained Base front-end connected to a non-Java database back-end is fully functional for the end user who has no Java installed if the developer abstained from the "Report Builder" extension.

This is virtually all I know about Java and OpenOffice. I used OpenOffice 1 and 2 with Basic and Python as macro languages with Java disabled or not installed on the computer. I added Java support when Base with its HyperSQL engine became interesting for me (version 2.4 of 2006).
Last edited by Villeroy on Sat Dec 12, 2020 2:00 am, edited 5 times in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
karolus
Volunteer
Posts: 1158
Joined: Sat Jul 02, 2011 9:47 am

Re: Troubleshooting OpenOffice and Java

Post by karolus »

Hallo
When I turn off the use of Java the folloing wizards don't work anymore:
menu:File>Wizard>Letter...
menu:File>Wizard>Fax...
menu:File>Wizard>Agenda...
menu:File>Wizard>Web Page...
In LO4.x these Wizards also work without Java, see <LO_installation_folder>/program/wizards/

Karolus
AOO4, Libreoffice 6.1 on Rasbian OS (on ARM)
Libreoffice 7.4 on Debian 12 (Bookworm) (on RaspberryPI4)
Libreoffice 7.6 flatpak on Debian 12 (Bookworm) (on RaspberryPI4)
User avatar
Ponny
Posts: 172
Joined: Sun Jun 21, 2009 7:34 pm
Location: Mystical Kingdom of Krakovo

Re: Troubleshooting OpenOffice and Java

Post by Ponny »

Meow

I think you a missed two little things here. Please correct me, if I'm wrong. And yes, this is not question. Just another information.

In OpenOffice 4.1.0, in Help, if you use tab "find" (type in keyword), you get error message:
"For this task OpenOffice needs runtime environment (JRE). Selected JRE is not usefull. Please select different version of JRE."

Or something similar this.

You can't serch Help by keywords if you not have installed JRE.

Oh yes, in my case, there is zero versions listed in Options / OpenOffice / Java setting.

And one more thing. If I for example in OpenOffice Basic in code window slecect one command and press F1, I get the same message.


Ponny
Last edited by Ponny on Sat Jun 21, 2014 12:09 pm, edited 1 time in total.
MS Windows 10: OpenOffice 4.1.13; LibreOffice 7.3.5.2
User avatar
RoryOF
Moderator
Posts: 34570
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Troubleshooting OpenOffice and Java

Post by RoryOF »

Under Windows OpenOffice requires a 32 bit Java installed and selected for use by OpenOffice. Read Villeroy's first posting in this thread again for the detail.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Troubleshooting OpenOffice and Java

Post by Villeroy »

RoryOF wrote:Under Windows OpenOffice requires a 32 bit Java installed and selected for use by OpenOffice. Read Villeroy's first posting in this thread again for the detail.
But the 2 little things mentioned were missing in my second posting about things that depend on Java.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
floris v
Volunteer
Posts: 4408
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Troubleshooting OpenOffice and Java

Post by floris v »

In LibreOffice 4.4 the java options are now in Tools - Options - LibreOffice - Advanced.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
Bill
Volunteer
Posts: 8929
Joined: Sat Nov 24, 2007 6:48 am

Re: Troubleshooting Open/LibreOffice and Java

Post by Bill »

Villeroy wrote:
 Edit: 2015-07-19: The major glitch with that list box is that it lists incompatible JREs among the compatible ones, particularly it lists 64-bit JREs that are incompatible with OpenOffice on Windows. Below the box you see the path of the currenly selected JRE. The path of a 32-bit JRE on a 64-bit Windows system usually starts with "C:\Program Files (x86)\" whereas the 64-bit JREs are stored under "C:\Program Files\". This is not a problem with 32-bit Windows systems where you can install 32-bit software only. The program path of a 32-bit Windows always starts with "C:\Program Files\" 
I can't duplicate this on 64-bit Windows 10 and don't recall it happening on 64-bit Windows 8 and Windows 8.1. If only a 64-bit Java Runtime is installed, no Java Runtime is listed. If a 32-bit Java Runtime and a 64-bit Java Runtime are installed, only the 32-bit Java Runtime appears in the list. Using the Add button and pointing to the location of the 64-bit Java Runtime produces an error claiming that the selected folder does not contain a Java runtime environment and the 64-bit Java Runtime isn't added to the list..
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Troubleshooting Open/LibreOffice and Java

Post by Villeroy »

Bill wrote: I can't duplicate this on 64-bit Windows 10 and don't recall it happening on 64-bit Windows 8 and Windows 8.1.
Attachments
Java options for LibreOffice 4.4.x on Windows Server 2008 (64-bit) with 32-bit Java selected and installed 64-bit Java below.
Java options for LibreOffice 4.4.x on Windows Server 2008 (64-bit) with 32-bit Java selected and installed 64-bit Java below.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Bill
Volunteer
Posts: 8929
Joined: Sat Nov 24, 2007 6:48 am

Re: Troubleshooting Open/LibreOffice and Java

Post by Bill »

I installed LO and also see the 32-bit and 64-bit Java Runtimes listed, so it appears to be a glitch in LibreOffice only. Apache OpenOffice lists only 32-bit Java Runtimes and doesn't add 64-bit Java Runtimes to the list.
LibreOffice dialog
LibreOffice dialog
Apache OpenOffice dialog
Apache OpenOffice dialog
AOO 4.1.14 on Ubuntu MATE 22.04
Bidouille
Volunteer
Posts: 574
Joined: Mon Nov 19, 2007 10:58 am
Location: France

Re: Troubleshooting Open/LibreOffice and Java

Post by Bidouille »

Remember that exists alternative to Oracle JRE: https://adoptopenjdk.net/
John_Ha
Volunteer
Posts: 9583
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Troubleshooting Open/LibreOffice and Java

Post by John_Ha »

Help also needs Java when doing a full text search under the Find tab - see Re: [Solved] "Help" broken after 4.1.8 update; Needs Java
Clipboard02.png
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
User avatar
Villeroy
Volunteer
Posts: 31264
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Troubleshooting Open/LibreOffice and Java

Post by Villeroy »

John_Ha wrote:Help also needs Java when doing a full text search under the Find tab
as already mentioned by user Pony on 2014-06-20 18:36
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Ms Ruth
Posts: 3
Joined: Thu Mar 19, 2020 9:00 pm

Re: Troubleshooting Open/LibreOffice and Java

Post by Ms Ruth »

Bidouille wrote:Remember that exists alternative to Oracle JRE: https://adoptopenjdk.net/
The rebranded website for OpenJDK is https://adoptium.net/
Apache OpenOffice 4.1.11
LibreOffice 7.1.8 (x64)
Windows 10
Locked