1.在終端中輸入sudo vim ~/.bash_profile打開文件 2.添加一個(gè)java環(huán)境變量 Paste_Image.png 3.保存并退出 4.輸入 sources ~/.bash_profile 環(huán)境變量添加成功