17-09-2021

Question or issue on macOS:

Download Java for OS X 2017-001. Java for macOS 2017-001 installs the legacy Java 6 runtime for macOS 10.13 High Sierra, macOS 10.12 Sierra, macOS 10.11 El Capitan, macOS 10.10 Yosemite, macOS 10.9 Mavericks, macOS 10.8 Mountain Lion, and macOS 10.7 Lion. This package is exclusively intended for support of legacy software and installs. There are two steps involved in getting NetBeans 8.2 to work: Download and install JDK 1.8 if it is not already on your machine: This answer describes how to do that for openjdk 1.8 on High Sierra. Alternatively, you can download Oracle JDK 1.8. The installation instructions are here. Once JDK 1.8 is installed, update the file netbeans.conf.

Install Multiple Java Versions on macOS High Sierra Install Homebrew Cask. On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. We see a lot of Chevy pickups, but relatively few GMCs, and as a result, this 1978 GMC High Sierra is a rather unusual find. A little more upscale than its Chevy siblings, this one includes a strong-running small block V8, a decent list of comfort and convenience options, and a nicely preserved overall presentation that will help its status as a future collectable. Tagged facebook-javascript-sdk java java-10 java-15 java-7 java-8 java-home java-native-interface java-opts java-security MacOS macos-big-sur macos-carbon macos-catalina macos-darkmode macos-high-sierra macos-mojave macos-sierra openjdk Post navigation.

I have searched several ways to change JDK version on mac.

And I got

I tried

also tried

then I run

/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home

then I re-check java -version

How I can really change java -version on my mac.

Jdk 8 High Sierra Update

How to solve this problem?

Solution no. 1:

To set Java to 1.8 for your shell environment, put this in your ~/.bash_profile:

Solution no. 2:

Download Jdk 8 For Macos High Sierra

Jdk 8 high sierra software

leave all JDKs at their default location, under /Library/Java/JavaVirtualMachines. The system will pick the highest version by default.
To exclude a JDK from being picked by default, rename its Contents/Info.plist to Info.plist.disabled. That JDK can still be used when $JAVA_HOME points to it, or explicitly referenced in a script or configuration. It will simply be ignored by system’s java command.
System launcher will use the JDK with highest version among those that have an Info.plist file.

When working in a shell with alternate JDK, pick your method among existing answers (jenv, or custom aliases/scripts around /usr/libexec/java_home, etc).

Jdk 8 High Sierra Download

Hope this helps!