LIbreoffice Mac Java problem (report 317404381)

Hi I am trying to install Zotero add in my LibreOffice 7.0 under MacOS Catalina -10.15.6 (19G2021)

The is a number of errors going on.

First as I try to install the following error message pops up:

"An Error occured during the instalation" and the following error report is created:
----
[JavaScript Error: "TypeError: temp is null" {file: "chrome://zotero/content/bindings/preferences-mac.xml" line: 1225}]
getPreferenceElement@chrome://zotero/content/bindings/preferences-mac.xml:1225:11
userChangedValue@chrome://zotero/content/bindings/preferences-mac.xml:1273:25
onxblcommand@chrome://zotero/content/bindings/preferences-mac.xml:1312:9


[JavaScript Error: "uncaught exception: unopkg at /Applications/LibreOffice.app/Contents/MacOS/unopkg failed to install"]

version => 5.0.89, platform => MacIntel, oscpu => Intel Mac OS X 10.15, locale => en-GB, appName => Zotero, appVersion => 5.0.89, extensions => ZotFile (5.0.16, extension), Zotero Memento (1.0.0, extension), Zotero Report Customizer (5.0.34, extension), Zutilo Utility for Zotero (3.5.0, extension), Zotero LibreOffice Integration (5.0.23.SA.5.0.89, extension), Zotero Word for Mac Integration (5.0.27.SA.5.0.89, extension), Better BibTex for Zotero (5.2.54, extension)
----

Then, When I try to run LibreOffice the following message pops up:

-----
LibreOffice requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective.
-----

When I Actually open LibreOffice there is a tool bar for Zotero but:

1 .There are no icons, they are in text mode
2. It does not work at all

Thanks
  • That message means what it says — you need the Java JRE installed and selected in the Advanced preferences in LibreOffice.

    https://www.zotero.org/support/word_processor_plugin_troubleshooting#installation_error
  • I have both JRE and JDK installed in my Mac. I think there is some bug in Zotero that prevents it from working with Libreoffice 7.
  • edited August 15, 2020
    No, this is an error from LibreOffice, not Zotero. Again, you have to have a functioning JRE installed, it has to be compatible with LO 7, and it has to be selected in LO.

    You should install the JRE from my link above — Java 8 — and select that in LO. Later JDK versions may not work with LO 7. This has nothing to do with Zotero.
  • edited August 15, 2020
    I did so and even though the error pops up and I cannot keep using Zotero with Libreoffice as I have used for over 7 years.
  • You should uninstall all versions of Java you have installed, restart your computer, make sure they're gone from the preferences in LO, and then reinstall the Java 8 JRE and try selecting that again in LO.

    The Java 8 JRE is working fine for us in LO 7. But again, this isn't a Zotero problem — if LO won't recognize your Java install, that's obviously not something we can fix — so if you're having trouble you'd have to ask LO for help.
  • edited August 15, 2020
    This can be very, very frustrating but you will eventually get things to work. Be sure that all traces of Java are removed from your system and from LO. This may take a couple of Mac system restarts after closing LO. Be sure to _verify_ that you have removed all JRE pointers from LO and from your system before you attempt to add Zotero to your LO. Don't take shortcuts or make assumptions. Don't install new JRE over an older version. I have questioned my competence and sanity a few times trying to remove all traces of Java/JRE when I've updated LO and had Zotero probelms. You are not alone in your frustration as witnessed by posts to this forum and to LO help forums. I find that cursing Oracle aloud sometimes seems to help. Eventually, you will get this to work properly by overcoming JRE's tenacious attempts to remain where it isn't wanted.
  • I tired everything you told me to do. It is still not working. Leaving Zotero for good, this bug seems not to go away.
  • Again, this isn't a Zotero problem — you're getting an error in LibreOffice, not in Zotero. Any LibreOffice extension that depends on Java will fail the same way. If you take a screenshot of the Advanced pane of the LibreOffice preferences, upload it somewhere (e.g., Dropbox), and provide a link, we might be able to spot something, but as we've said, the place to ask about this is in the LibreOffice forums.

    In the meantime, you can just reinstall LibreOffice 6 until you and the LibreOffice folks can figure out why it's rejecting your Java installation.
  • Just to update this, it seems like LibreOffice on macOS currently requires a Java JDK, not the Java 8 JRE, and LibreOffice 7 works with JDK versions up to 12, not newer versions. (Our troubleshooting documentation said the JDK was required on macOS 10.11 and up, but I was testing this wrong.)

    On Windows, the Java 8 JRE works fine.

    So, currently, you should install JDK 12 on macOS if you want to use the LO plugin.

    Sorry for the confusion.
  • edited September 29, 2020
    Hi..

    Tried again with JDK 12 and JDK 11, neither of them seems to wok, as the same error message poped up.

    I feel sorry because users might not be able to stick to older versions forever.

    Thanks
  • That's the "LibreOffice requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective." message?

    Can you take a screenshot of the Advanced pane of the LO prefs with JDK 12, upload it somewhere (e.g., Dropbox), and provide a link here? You can also email to support@zotero.org with a link to this thread if that's easier.
  • Yes.. It happens with every Java I try. I will make a couple of screenshots and provide you the linl
  • Hi...

    I made a small video trying all versions of JDK and Java. The link expires in 7 days time:

    https://we.tl/t-vKH1pPMxLj

    If I uninstall LO 7 and use a earlier version it works out of the box.
  • edited January 18, 2021
    First, we can't vouch for AdoptOpenJDK, and in fact it doesn't work for me. LO does work for me with Java 11 from Homebrew, copied (not symlinked, as the keg recommends) into /Library/Java/JavaVirtualMachines. The OpenJDK 11 from Oracle should also work.

    Second, I believe the LibreOffice developers have fixed the incompatibility between LO 7 and more recent JDK versions for LO 7.1, so once that's out this should work better. I haven't tested the LO nightlies to confirm that.
Sign In or Register to comment.