OpenJDK on MacOS

Issues installing under the Mac OSX - X11 - Aqua

OpenJDK on MacOS

Postby wingman » Thu Dec 12, 2019 12:55 pm

I have set up openjdk 11 with home-brew, symlinking /usr/local/opt.openjdk@11/libexec/openjdk.jdk/ to /Library/Java/JavaVirtualMachines/openjdk-11.jdk/

I can run java in the terminal and other software can find the JDK/JRE. Libreoffice 6.3 does not detect a java environment. I have tried manually specifying the location, but /Library/Java/JavaVirtualMachines/ nor /Library/Java/JavaVirtualMachines/openjdk-11.jdk/ nor usr/local/opt.openjdk@11/libexec/ nor /usr/local/opt.openjdk@11/libexec/openjdk.jdk/ are recognized.

How can I have LibreOffice use the openjdk environment? Is it possible at all, if not, why not?
Libreoffice 6.3 on macOS 10.15
wingman
 
Posts: 4
Joined: Thu Dec 12, 2019 12:43 pm

Re: openjdk on macOS

Postby MrProgrammer » Thu Dec 12, 2019 5:04 pm

Hi, and welcome to the forum.

wingman wrote:Libreoffice 6.3 does not detect a java environment.
Note that you must restart the suite after installing Java. I use neither LibreOffice nor JDK but you can read advice about using JRE if you need Java to work.
[Tutorial] Mac FAQ Q06/A06
Mr. Programmer
AOO 4.1.7 Build 9800 on MacOS 10.14.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Moderator
 
Posts: 3961
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: openjdk on macOS

Postby wingman » Thu Dec 12, 2019 9:15 pm

Thank you for responding.

I had read the documentation, but I see no reason why it does not work with openjdk, as LibreOffice works with openjdk on other platforms.

What could cause this issue? other software works fine with openjdk 11 and the java environment is set up normally. Is LibreOffice for macOS hardcoded to only use oracle's java versions?
Libreoffice 6.3 on macOS 10.15
wingman
 
Posts: 4
Joined: Thu Dec 12, 2019 12:43 pm

Re: openjdk on macOS

Postby RoryOF » Thu Dec 12, 2019 9:22 pm

You could manually enter the path to the Java in /Preferences /Options OpenOffice : Java

The entry might be something like /usr /lib /jvm /java-11-openjdk-something
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31416
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: openjdk on macOS

Postby wingman » Fri Dec 13, 2019 12:51 pm

RoryOF wrote:You could manually enter the path to the Java

I had tried that already, and have tired again, but is does not work. I have no idea why, that there is a symlink to reach the path is the only obvious difference with the oracle jdk (except of course the differences inherent to openjdk vs oracle jdk). Permissions are correct and the directory structure of the jdk looks identical.
Libreoffice 6.3 on macOS 10.15
wingman
 
Posts: 4
Joined: Thu Dec 12, 2019 12:43 pm

Re: openjdk on macOS

Postby RoryOF » Fri Dec 13, 2019 12:54 pm

I'm not a Mac user, so can only make a wild suggestion. From memory, some versions of macOS require Oracle Java 6 installed before they will recognise later Java versions; whether this is so in your case, I cannot say. But you need advice from an experienced Mac user, not from me.
Apache OpenOffice 4.1.7 on Xubuntu 20.04.1 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 31416
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: openjdk on macOS

Postby wingman » Fri Dec 13, 2019 12:59 pm

OpenJDK is working fine for other applications. I have now installed the OracleJDK in parallel, which is recognized by other applications as well as LibreOffice.

Specifically LibreOffice appears to have issues with openjdk, no other application I have tested.
Libreoffice 6.3 on macOS 10.15
wingman
 
Posts: 4
Joined: Thu Dec 12, 2019 12:43 pm

Re: openjdk on macOS

Postby MrProgrammer » Fri Dec 13, 2019 5:36 pm

wingman wrote:What could cause this issue? … Specifically LibreOffice appears to have issues with openjdk, no other application I have tested.
Look at these LibreOffice issues, perhaps starting with 101956. Remember that this is a user-to-user forum. You won't find developers here. I am done helping with this topic.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800 on MacOS 10.14.6.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
MrProgrammer
Moderator
 
Posts: 3961
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA


Return to Mac OSX

Who is online

Users browsing this forum: No registered users and 3 guests