今天在發布Java項目的時候又遇到
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program
這種情況了,
解決辦法:
首先查看環境變量:
vim /etc/profile
找到JAVA_HOME
把路徑記錄下
編輯文件
/usr/local/tomcat/bin/catalina.sh (有可能你的路徑和我的不一樣,按照自己的路徑來修改)
添加到文件中的第二行
