/Library/java/JavaVirtualMachines/java
vim .bash_profilevim
文件中追加一下信息:export dirname=目录路径bash
重启终端或source .bash_profile后file
便可使用: cd $dirname终端