After installing Java on CentOS and configuring environment variables, an error occurred while installing Maven configuring environment variables.
Error: JAVA_HOME is not defined correctly.
vim /etc/profile
export JAVA_HOME=/usr/ Java /jdk1.8.0_171
export JAVA_HOME=/usr/ Java/jdk1.8.0_17/bin/java can be changed to
0. 0 I was really helpless, a little little detail did not notice, do along while