Unable to install java8 with homebrew

89,462

Solution 1

This has already been answered as a github issue: https://github.com/Homebrew/homebrew-cask-versions/issues/7253

TLDR: the java8 artefact refers to the Oracle distribution, which has ceased being supported/available. If you really need java 1.8 instead of the latest versions you can take a look at AdoptOpenJDK/homebrew-openjdk.

Solution 2

New command is now :

brew install --cask homebrew/cask-versions/adoptopenjdk8

Solution 3

The command is now brew cask install homebrew/cask-versions/adoptopenjdk8

Solution 4

brew install homebrew/cask-versions/adoptopenjdk8 --cask

In the latest changes of homebrew cask will have to be at the last.

Solution 5

For Homebrew 2.7.0. the brew cask commands are disabled

The command is now changed to

brew install --cask adoptopenjdk/openjdk/adoptopenjdk8

Share:
89,462
dmitrybelyakov
Author by

dmitrybelyakov

Updated on July 05, 2022

Comments

  • dmitrybelyakov
    dmitrybelyakov almost 2 years

    Installing java8 with Homebrew seems to no longer be working. After running:

    brew install caskroom/cask/java8
    

    I get the following error:

    Error: Cask 'java8' is unavailable: '/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/Casks/java8.rb' does not exist.
    

    Simply doing:

    brew cask install java8
    

    Errors out with:

    Error: Cask 'java8' is unavailable: No Cask with this name exists.
    

    This seems like a recent development because I remember installing it this way a few months ago. Any suggestions on how to properly install java8 on MacOS nowadays?

  • Alexander Suraphel
    Alexander Suraphel over 4 years
    Thanks. Is there any difference between the two?
  • Kiskae
    Kiskae over 4 years
    Presumably the oracle distribution could have proprietary additions, while the AdoptOpenJDK distribution is just a build of the open-source OpenJDK project.
  • Jatin
    Jatin over 4 years
    Doesn't work for me but this works as suggested by Corey - brew cask install homebrew/cask-versions/adoptopenjdk8
  • waffles
    waffles over 3 years
    Updated command for me is brew install --cask homebrew/cask-versions/adoptopenjdk8
  • cheesydoritosandkale
    cheesydoritosandkale about 3 years
    That worked for me too uMdRupert - thank you!
  • Sigfried
    Sigfried about 3 years
    Me too, @uMdRupert. Sorry to add "me too!" but there's a lot of other stuff here to try. I had nearly given up before trying that one.
  • Vladimir Kuzomenskyi
    Vladimir Kuzomenskyi over 2 years
    curl: (22) The requested URL returned error: 404 File not found Error: Download failed on Cask 'java8' with message: Download failed: localhost:8000/jdk-8u231-macosx-x64.dmg