Zotero Plugin for Libreoffice 7.0.x broken
Setup:
MacOS 10.15.7, Homebrew openjdk 14.0.1, LibreOffice 7.0.1.2, Zotero 5.0.90, Zotero LO plugin 5.0.23 installed (from previous versions).
Issue:
Starting LO, calling Zotero from tool bar brings up a dialog:
"LibreOffice requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under LibreOffice - Preferences - LibreOffice - Advanced. [OK]"
Root cause:
There seems a change in how JDK 14 loads the plugin code. This change prevails in JDK 15.
How to work around this issue:
Installing JDK 12 works -> Zotero plugin gets loaded and works fine
On MacOS simply copy a JDK 12 into the directory /Library/Java/JavaVirtualMachines.
Select it in LO and Zotero works as usual.
This workaround is not a permanent solution. I think, Zotero should look into this issue and fix the problem.
MacOS 10.15.7, Homebrew openjdk 14.0.1, LibreOffice 7.0.1.2, Zotero 5.0.90, Zotero LO plugin 5.0.23 installed (from previous versions).
Issue:
Starting LO, calling Zotero from tool bar brings up a dialog:
"LibreOffice requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under LibreOffice - Preferences - LibreOffice - Advanced. [OK]"
Root cause:
There seems a change in how JDK 14 loads the plugin code. This change prevails in JDK 15.
How to work around this issue:
Installing JDK 12 works -> Zotero plugin gets loaded and works fine
On MacOS simply copy a JDK 12 into the directory /Library/Java/JavaVirtualMachines.
Select it in LO and Zotero works as usual.
This workaround is not a permanent solution. I think, Zotero should look into this issue and fix the problem.
@adomasven would know better, but it's not at all clear to me this is a problem in the Zotero plugin rather than in LO 7. I believe the Zotero plugin worked fine with newer Java versions in LO 6.
@adomasven: I have discussed this issue in length with LO (https://bugs.documentfoundation.org/show_bug.cgi?id=135462). Their work is ok (other plugins work fine). As for Java developers: Oracle provides a platform (JDK 15).
Summarising: Take an open-minded user, a new Mac (MacOS 10.15.7), install Java (JDK 15), install LO (7.0.1), Zotero (5.0.90) and install the plugin into LO. All standard procedures. Does it work?
(You may want to ask yourself, does LO and JDK 15 work fine on MacOS 10.15.7 - the answer is: Yes it does)
I'm pretty sure that - following the above mentioned threads - you will understand this Zotero issue needs urgent fixing.
In any case, there's nothing we can fix here, other than recommending a version of Java that LibreOffice accepts. On macOS, for LO 7, that seems to be JDK 12. We'll update the documentation accordingly.
JDK 12 does not work either (as this gets security updates as well), tried this as well. Currently there is no ordinary way to make Zotero work in combination with LO on Mac.
LibreOffice 7 — for the "technology enthusiast, early adopter or power user" — doesn't work properly with newer JDK versions, but it works with older versions of the JDK. I have it running with the Java 11 JDK from Homebrew (though for some reason I had to copy it to /Library/Java/JavaVirtualMachines rather than symlink it as the keg suggests). The JDK from Oracle (behind a login) probably also works. Versions of the AdoptOpenJDK didn't work for me when I tried.
@dstillman: I agree that LO 7 is claimed for the technology enthusiasts. However, there are some fixes and features that I require (one being that it displays fonts correctly on a Mac HDPI display and not blurs it). So I am caught in a situation where I can either work with blurry text and working Zotero or sharp text and non-functional Zotero.
I have tested the Oracle verified versions as well (not the GA). The issue is the same.
Let's conclude this discussion:
I accept (have to) that this is not on your agenda.
Please accept that there are a whole bunch of reasons why I need my configuration to work as it is (LO7, JDK14/15,MacOS 10.15.7 or 11).
Thanks for your patience.
Helping Zotero users getting the integration to run on various configurations is certainly on our agenda when it's a matter of troubleshooting a config. We have assisted numerous Zotero users with LibreOffice and Java configuration problems in the past and can tell you what we know about troubleshooting but you need to stop insisting that there's some general problem on our side, because there is not.
You can try setting up a new User Account on your Mac, enable Oracle JDK 11 in LibreOffice and then try to install and use the Zotero plugin. If it works that means there's something with either Java or LibreOffice settings on your default account which is interfering with the JDK working in LibreOffice correctly. If it does not work, I wonder whether you get a different error message as compared to the one you get with JDK 14 and if you do, what that is. You should probably also report that to LibreOffice since they're only investigating incompatibility with JDK 14 and upwards.
Since I installed apache-spark, I both have JDK11 and JDK17 on my machine. I went to LO Preferences -> Advanced and added both versions but selected only JDK11. Then I followed the prompt on Zotero and the installation was smooth.
I installed the openjdk using Homebrew. If you `brew install scala`, you will get JDK17 as a dependency, whereas if you `brew install apache-spark` you will get JDK11. However, you can install either using `brew install openjdk@11` for JDK11 and `brew install openjdk` for JDK17 (`brew install java` is a synonym, so you'd get JDK17).