Created
March 25, 2019 07:25
-
-
Save lhy880518/0fb917b2fd36d20e543ca350d3475a51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java -version | |
=========================================================================== | |
java version "1.8.0_201" | |
Java(TM) SE Runtime Environment (build 1.8.0_201-b09) | |
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode) | |
=========================================================================== | |
vi ~/.bash_profile | |
and add this | |
=========================================================================== | |
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk|your install jdk version|.jdk/Contents/Home | |
PATH=$PATH:$JAVA_HOME/bin | |
export JAVA_HOME | |
export PATH | |
=========================================================================== | |
source ~/.bash_profile | |
java -version again |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment