1

When I am running my maven build I am getting this error:

Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/bin/bin/java

I have edited .bashrc, .profile, /root/.profile and /root/.bashrc files with this:

export M3_HOME=/usr/bin
export PATH=$PATH:$M3_HOME

export JAVA_HOME=/usr/bin
export PATH=$PATH:$JAVA_HOME

How to fix this?

1

You probably want JAVA_HOME to be /usr (or whatever it's supposed to be, I'm not a Java user, but it's usually something like /usr/java/jdk1.7.0_05, i.e. pointing to a specific JDK subdirectory), and then PATH to include $JAVA_HOME/bin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.