Category: linux

Using the mysql command bundled with MySQL Workbench


I just found that I, when I installed MySQL Workbench, have mysql command in my macOS.

I added an alias to my .zshrc.

alias mysql=/Applications/MySQLWorkbench.app/Contents/MacOS/mysql

java_home environment variable


Windows

N/A

OS X

installations

$ ls -l /Library/Java/JavaVirtualMachines/
....
$

/usr/libexec/java_home

$ /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/jdkx.y.z_mm.jdk/Contents/Home

$ /usr/libexec/java_home -v 1.8
/Library/Java/JavaVirtualMachines/jdk1.8.0_mm.jdk/Contents/Home

$ /usr/libexec/java_home -v 1.7
/Library/Java/JavaVirtualMachines/jdk1.7.0_mm.jdk/Contents/Home

~/.profile

$ cat ~/.profile
...
export JAVA7_HOME=$(/usr/libexec/java_home -v 1.7)
export JAVA8_HOME=$(/usr/libexec/java_home -v 1.8)
export JAVA_HOME=$JAVA8_HOME
...

$ echo $JAVA7_HOME
/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home

$ echo $JAVA8_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home

$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home

$

Ubuntu

See installing latest oracle jdk in old ubuntu.