Skip to content

Instantly share code, notes, and snippets.

@lhy880518
Created March 25, 2019 07:25
Show Gist options
  • Save lhy880518/0fb917b2fd36d20e543ca350d3475a51 to your computer and use it in GitHub Desktop.
Save lhy880518/0fb917b2fd36d20e543ca350d3475a51 to your computer and use it in GitHub Desktop.
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