MacOS 10.9.4 + LO 4.2 + Java 8 x64. Does this combination work?

  • I am running Mac OS X 10.9.4 in
    English
  • I have installed the 64 bit
    version of JDK and am running version
    8 update 11.
  • I have verified this by typing
    java -d64 -version and java -d32
    -version in Terminal
  • My JDK is installed to /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk
  • I have installed LibreOffice Version:
    4.2.5.2 Build ID: 61cb170a04bb1f12e77c884eab9192be736ec5f5

In LibreOffice’s Preference’s menu’s advanced section, I am trying to add a Java runtime environment. None is detected by default. However, I’m not sure what folder I should be adding and every folder that I try to add has given me an error message. Any help would be appreciated.
Examples of paths that I have tried:

  • /Library/Java/JavaVirtualMachines/
  • /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/
  • /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre/
  • etc

My desire for getting LibreOffice to recognize Java is so that I can run some macro’s in a Calc Spreadsheet.

Update

Despite getting LibreOffice to recognize Java 8’s runtime environment, trying to run the macro in a Calc Spreadsheet this time prompted me with a new dialog box from Apple saying that Jave SE 6 was required to run the macros.

Thanks Karolus, but unfortunately when I select Tools->Macro-Run Macro, LibreOffice shows a dialog box that says: “LibreOffice requires a Java runtime environment (JRE) to perform this task. Please install a JRE and restart LibreOffice.”

That worked. Thank you very much!

The Apple message about Java 6 SE being required sounds a lot like the issues I link in this answer. I hope this is not another Apple vs Oracle nightmare again.

I’m running the same configuration (Mac OS 10.9.4, LibreOffice 4.2.5.2 x86-64, JRE 1.8 64 bit) and some of my macro operations cause LO to quit with “No Java runtime present, requesting install.” The Java came with this Mac OS release—I haven’t done any download. And I’ve used “Preferences->Advanced-Java options” to select that JRE (/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre). LO lists the vendor as “Oracle Corporation” and the version as 1.8.0 (same as I get with “java -version” at the command line).

Whenever I do a “Tools → Customize → Toolbars tab → Add …” and try to expand any subheading under “LibreOfficeMacros”, such as “MyMacros”, LO just fails with the above java runtime message, with a command-line return code of 97.

The system works fine if I do “Tools → Macros → Organize Macros → LibreOffice Basic …”, allowing me to view all LO Basic macros under the subhead and select one for editing.

But if I select any language other than LibreOffice Basic (I’ve tried “JavaScript” and “Python”) under “Organize Macros”, LO fails with the same return code of 97 and the message about the Java runtime.

One final weirdness: The first times I tried this, I started LO using the icon in my dock. When I got the error, I’d get some sort of (Apple? Oracle?) modal dialog box about needing JRE 1.6. After a while, LO stopped going to the dialog and started crashing quietly without any dialog. I don’t THINK I changed anything. So I started running LO directly from the command line, using /Applications/LibreOffice.app/Contents/MacOS/soffice. That’s where I get the text I quoted at the start and the return code of 97.

tl; dr — more Java/Mac OS 10.9/LO fun.

After @oweng kindly engaged me with regards to this problem (see his response), I decided to try a clean install of LibreOffice, which had the desired result.

I believe the difference is the install order of LibreOffice and Java.

LibreOffice then Java -> LibreOffice does not detect Java runtime.
Java then LibreOffice -> LibreOffice detects Java runtime.

The path it detected for the Java 8 installation is the same as one of the above paths that I tried to manually ad: /Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home/jre/

The clean install LibreOffice has the same version and build # as previous version I was using when I posted this question.
+++++++

To address the second question, about needing Java SE to run a macro in a calc worksheet,
@karolus kindly informed me of a alternate way to run macros that does not require having Java installed.

Tools→Macros→OrganizeMacros→LibreOffice-Basic....

Thanks for converting this comment to an answer. Please ignore the edits to my answer.

Four possible bug reports could be filed.

  1. for having LibreOffice not detecting
    Java when Java was installed after
    Libre Office
  2. Libre Office not accepting the
    correct path I manually tried to set
    for the Java runtime
  3. Libre Office’s Tools->Marcro->Run seems to have an unnecessary dependency on Java when an alternative method is not.
  4. If the above dependency is legitimate, then LibreOffice should be updated to support Java 8.

A1: I am not sure about (may not be possible). A2: I think requires setting the JAVA_HOME environment variable (refer this thread). A3: Like @karolus, I am surprised by this. I am wondering if some other Java-based facility is being initiated, thus triggering the message?

I have installed the 64 bit version of JDK and am running version 8 update 11.

This may be the issue. I have not read or seen anything official that suggests LO is compatible with Java 8 at this point. A French QA mailing list thread from April 2014 indicates there are people out there having success with Java 8 (LO v4.1.x in that case), but there are very few reports like this. Is there some specific reason you require Java 8? The English Java site still offers Java 7 by default.

The recent history of Apple vs Oracle, in terms of Java, means it also may be an issue unrelated to LO.

The answer here about which version of LO to download is also related.

Thanks for the suggestions Oweng. I tried installing JDK 7. It’s directory structure seems identical to the JDK8 instillation I mention in my main post. From Libre Office, I tried selecting similar folders inside the JDK 7 installation, but again no luck.

I don’t have a compelling reason to use Java 8. This FAQ from java . com describes that Java 8 is being treated like a “developer’s preview” of sorts to give applications time to support it before java . com directs end users to download it.

@NewGamePlus, I assume you installed the “x86_64” version of LO for MacOS and not the “Intel” one?

A logical question. I believe I did the first time because that is the default download option when I view http://www.libreoffice.org/download/libreoffice-fresh/ from my Mac. However, I decided to try a clean install of LibreOffice, which had the desired result.