Help Center> CodeArts Deploy> FAQs> Common FAQs> JDK Has Been Installed and Environment Variables Have Been Configured, But Application Deployment Fails with the Error Message "please configure JDK environment variables" Displayed
Updated on 2023-09-13 GMT+08:00

JDK Has Been Installed and Environment Variables Have Been Configured, But Application Deployment Fails with the Error Message "please configure JDK environment variables" Displayed

Symptoms

JDK has been installed and environment variables have been configured. But application deployment fails with the error message please configure JDK environment variables is displayed.

Cause Analysis

Environment variables are not configured in the $HOME/.bashrc and $HOME/.bash_profile files.

Solution

Add the following code segment to the end of the $HOME/.bashrc and $HOME/.bash_profile files:

export JAVA_HOME=/usr/local/java/jdk1.8.0_144
export JRE_HOME=/usr/local/java/jdk1.8.0_144/jre
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$PATH

Common FAQs FAQs

more