Home > Java > javaTutorial > Where Does Java 8 Go on Mac? Resolving Oracle\'s Installation Enigma.

Where Does Java 8 Go on Mac? Resolving Oracle\'s Installation Enigma.

Susan Sarandon
Release: 2024-11-02 22:48:30
Original
533 people have browsed it

Where Does Java 8 Go on Mac? Resolving Oracle's Installation Enigma.

How to Install Java 8 on Mac: Navigating Oracle's Quirks

This article addresses the installation challenges faced by Mac users attempting to install Java 8 for developing with JavaFX. Despite running Oracle's installer, the files appear to be placed in an unexpected location (/Library/Java/...), causing difficulties in locating and setting the current Java version.

Oracle's Installation Enigma

The disparity between Oracle's installer placement of Java 8 (/Library/... vs. /System/Library/...) presents a perplexing issue. The System Preferences "Java" control panel ironically displays Java 1.8, contradicting the absence of the corresponding version in /usr/libexec/java_home -V.

Homebrew to the Rescue

Fortunately, Homebrew provides a solution to these installation woes. Using Homebrew, users can conveniently install the latest OpenJDK (Java 14) directly into an appropriate location with the command:

brew install --cask adoptopenjdk8
Copy after login

For cases requiring an older version (e.g., Java 8), the AdoptOpenJDK project allows for an additional step to install Java 8:

brew tap adoptopenjdk/openjdk
brew install --cask adoptopenjdk8
Copy after login

Users with existing Homebrew installations may encounter an error related to multiple taps. This can be resolved by specifying the location explicitly:

brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
Copy after login

The above is the detailed content of Where Does Java 8 Go on Mac? Resolving Oracle\'s Installation Enigma.. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template