Uzzu::Blog

Software Design, and my life.

JDKをシュッと切り替える

最近よくJavaの実行環境を切り替えるので、以下の雑shell scriptで凌いでいます。

$ javaenv
/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home

$ javaenv 11
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home

$ javaenv 1.8
export JAVA_HOME=/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home
comments powered by Disqus