How to install java 8 on osx macOS Mojave with hom

2020-05-14 19:10发布

At the moment Java 8 is still required for some apps like:

  • Android SDK / Android Studio
  • Jenkins
  • Ionic ...

With brew install java the latest Version is installed. But how to install Java 8?

2条回答
你好瞎i
2楼-- · 2020-05-14 19:27

The older Oracle JDKs are gone from Homebrew now. Use OpenJDK instead:

brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk8

OpenJDK is a drop-in replacement for the Oracle JDK in most places, so this should work fine for you with no code or build process changes.

查看更多
霸刀☆藐视天下
3楼-- · 2020-05-14 19:27

This answer is outdated.

You can install Java 8 on macOS Mojave like this:

brew tap caskroom/versions
brew cask install java8

In case the latest java version was already installed, uninstall it with:

brew cask remove java
查看更多
登录 后发表回答