老是报错,我试了所有人的方法都不行。
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE
下面是.bash_profile配置文件内容:
export JAVA_HOME=/Library/Java/JavaVirtualMachins/jdk1.8.0_221.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
export M3_HOME=/opt/apache-maven-3.6.1
export PATH=$M3_HOME/bin:$PATH