简体   繁体   中英

Error: JAVA_HOME is not defined correctly (mvn clean package -DskipTest)

I am new to command line and Ubuntu.

I am trying to run this:

mvn clean package -DskipTest 

as indicated on this site: https://github.com/forcedotcom/dataloader/

I opened up Command line and typed.

I am getting error message:

Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/lib/jvm/java-oracle/bin/java

Any lead would be appreciated greatly.

Error: JAVA_HOME is not defined correctly.

向您表明未正确安装JDK,应重新安装JDK,请参见OpenJDK页面 ,您可以尝试使用以下命令:

sudo apt-get install openjdk-8-jdk

Have a look here: https://askubuntu.com/questions/175514/how-to-set-java-home-for-java

JAVA_HOME=/usr/lib/jvm/java-7-oracle
export JAVA_HOME

You can also set it in /etc/environment or ~/.profile or ~/.bash_profile etc. But check which version is installed on your system.

Or you download the JDK as tar, unpack it in your home and use that jdk (allwoes to have different versions installed and easy switching those).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM