Installing Java on macOS

TLR:
decompressing the Oracle "jdk-21_macos-x64_bin.tar.gz" file just created a directory full of files and sub-folders for the JDK into my macOS user account ~/Downloads Folder/.

Should I attempt to cp the whole directory into /Library/Java/JavaVirtualMachines (which already exists but is an empty directory far as I can tell with `ls -A` )?

The Oracle documentation says I should have got a disk image for the macOS installer. I'm stuck. A pretty fed up at this point, hours I did not have to waste have been wasted.

__________________________


Long and complaining version:

I am trying to install Zotero plugin for LibreOffice on a macOS M-series Mac mini as my last option, Pages is a no go and Word is telling me I need admin approval (I recently changed my MS account to university so I didn't have to pay $10 a month any more). It's not a macOS admin they're talking about, it's a MS Office 365 admin account. Why this has to happen I have no idea, what business is it of my university what add-ons and plugins I desire to install? AutoDesk don't put me through this grief for education license for all their software and the uni isn't even paying AutoDesk a red cent, where as MS has all their backend for email etc etc.

I'm stuck — and I have déjà vu TBH. I think I've been here before, wasted a ton of time when I didn't have it to waste and given up. And now I have less time. this kind of user experience is why people avoid OSS I suspect.

The install instructions for word processing plugins are scant, and should cover the JVM download and install because the web of instruction page on Oracle website are scant, incorrect and in my case not even remotely like what I'm seeing once I download the .tar.gz file from the Oracle server.

These are my steps so far:
1. the Zotero installer (a typical macOS installer application) stops and says I need the Java Development Kit (JDK) to proceed. It links to here for the DL:
https://www.oracle.com/java/technologies/downloads/

2. there's only two ARM64 downloads and only one is a .tar.bz which the Oracle install instructions elsewhere say to install for Mac (they say DL either a .tar.bz or .dmg file). So DL the jdk-21_linux-aarch64_bin.tar.gz

3. When I double click the DL file it doesn't produce a .dmg file or a macOS binary, it produces the application directory that presumably would want to get installed into /Library/Java/…

4. Been right through the Oracle documentation including this: (https://docs.oracle.com/en/java/javase/21/install/installation-jdk-macos.html#GUID-F575EB4A-70D3-4AB4-A20E-DBE95171AB5F) and it offers zero clues (or fucks obviously) that the download is decompressing into not what they claim it will, not a binary and not a macOS disk image.

should I attempt to cp the whole directory into /Library/Java/JavaVirtualMachines (which already exists but is an empty directory far as I can tell with `ls -A` )?
  • edited December 8, 2023
    Please start new threads for new issues. I've moved this to a new thread.

    You're making this way more difficult than it is. You can just download the ARM64 DMG Installer and run it. That's the point of an installer.

    If you really wanted to do it manually, you could download the .tar.gz file, double-click it to create a jdk-17.0.9.jdk folder, and drag that folder to /Library/Java/JavaVirtualMachines. Enter your password when prompted and you're done. But there's no reason not to just use the installer.

    If you were supposed to do something at the command line, we would tell you, but this is a basic thing that you can do with a few clicks.
  • Thanks @dtillman for the prompt response. But exactly where is the double click installer (presumably a .dmg file) for macOS?

    I linked to the webpage I am directed to by the Zotero installer in OP, it's to here:
    https://www.oracle.com/java/technologies/downloads/

    Believe it or not, I don't wanna make it any more complicated that I have to. I'm simply trying to follow the prompts that I'm presented with to do this thing.

    Please indicate to me in child-friendly detail where the double click installer of JDK for macOS is on the page I've linked to.

    I must be blind but I can't see it!

    That's the only reason why I started reading the JDK for macOS installation documentation and trying to do things to help myself.

    I was quite impatient to get it working ASAP. (did I mention timeline to finish writing 3 papers and then to do all the DTP in InDesign* by this Wednesday)

    I have spent a long time trying to locate a DMG file for macOS JDK on the offical Java sit and have failed in that search repeatedly. Thanks for your patience.

    ________________

    *The following is just me brad crumbing my (failed) steps so far attempting to help myself and otter's who find themselves travelling on this path on a dark winter's night.

    Also, if there is a confusing issue for some macOS users attempting to install for LibreOffice, let's clean it up ASAP.* Happy to help when my trimester ends in less than a weeks time.

    I don't even want to use LibreOffice but my Word (and Excel) installation(s) (once paid for by me) have now been hobbled by the University install and licensing. Word and Excel now actively block add-ons and plugins. (Unbelievable, right?!). Uni help desk unresponsive to date. And Apple Pages has no offical API (grrr, Apple).

    I'm on a time-line and desperately trying to get past the first pane of the Install for LibreOffice window. I promise I'm not looking for extra fun this week.

    1. this is a screenshot of what I see on the Install zero for LibreOffice installer, the first step in the installation process:
    https://www.icloud.com/iclouddrive/0a0pmheGPxkaP3iyi1zJt08sQ#Screenshot_2023-12-09_at_11.00.03_am

    4. If I attempt to click the "Go Back" button, nothing happens. The "Continue" button is slightly greyed out, not in a standard macOS UI way but I can see they tonal difference just. This would indicating it's not an option. If I attempt to click it nothing happens.

    4a. I'm reluctant to click "Cancel" and then start again b/c I'm worried I wont find it again given this message when I click "cancel"

    "Are you sure you want to cancel Zotero LibreOffice Integration installation? To install later, visit the Cite pane of the Zotero preferences." I'm pretty new to Zotero, just been using it to DL and view/comment PDFs of papers so far.

    5. My conclusion is that the JDK is not installed (last night I tried installing with homebrew, and some of the info at end of install says this:

    > For the system Java wrappers to find this JDK, symlink it with
    sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk

    > openjdk is keg-only, which means it was not symlinked into /opt/homebrew, because macOS provides similar software and installing this software in parallel can cause all kinds of trouble.

    6. I don't want "all kinds of trouble" (or even a little bit of trouble) so I think I might use home-brew to uninstall that particular JDK install.

    7. I also checked out openJDK but go exactly the same manual install directories as the Oracle JDK .tar.bz file decompresses as.


    8. I'm not a professional developer and don't want to make life difficult.

    9. I'm following the instructions from the Zotero documentation and then jumping to the JDK documentation, because it's not as easy as the Zotero documentation would suggest.

    10. please check my links to see what I'm seeing. I assume that is what other macOS installers would see?

    11. if there is a DMG on the Oracle JDK webpage I cannot see it for some reason. (Dyslexia?)

    Thanks for you patience with me, I'm trying to help myself, but also others who find themselves in this predicament and in difficulties with what should be, as you say, an uncomplicated requirement to add the JDK on macOS.

    p.s. noted you instruction about starting a new thread in future.

    this started for me with wanting to install Zotero add-on for LibreOffice on macOS and some others had had issues with the JDK install step in that thread so I thought I was ok to add to that thread, I'm used to being told on StackExhange not to start a new thread if one already exists!

    * Is see there is no Zotero for InDesign plug-in (https://forums.zotero.org/discussion/comment/68832#Comment_68832)  — if there was I'd skip LibreOffice and go straight to InDesign at this late stage in my trimester. If considering an InDesign plugin, maybe Adobe with its big resources and off-shore programming team could help? consider me a plus one if you are thinking about it.
  • So I successfully completed the install manually
    1. cp'd jdk-21.0.1.jdk in Download folder to /Library/Java/JavaVirtualMachines/
    2. In terminal >$ "brew uninstall openJDK" (for safety)
    3. Cancelled out of the installer since it couldn't go forward. (Since Zortero is not able to be prompted to refresh the search for JDK install).
    4. Zortero App> Settings… > Cite tab> click Word Processors button at top (as in Zortero docs).
    5. click install LibreOffice Add-in

    All good.

    Please lets clear this JDK issue up for future travellers on macOS, I'm 30% sure I'm not an idiot and can follow clear instructions :-)
  • also seems happily installed on Word after a restart of Word.

    Installing from the Word application was where it got blocked by MS requiring an administrator to approve it (not a macOS account admin, a MS network admin, a university + MS deal kind of thing, I think),

    Installing the plug-in from Zortero wasn't a problem. I'll put this one on a new thread for other weary travellers. It did beachball and hang Word the first time I tried to add a citation but after another restart of Word it's all running fine (so far).
  • edited December 9, 2023
    I gave you the literal text of what to download: "ARM64 DMG Installer". You said yourself there are two ARM64 download options, one being the .tar.gz. This is the other one.
Sign In or Register to comment.