Reputation: 2280
I am running 10.9, which came with 1.7 already installed. Several months ago, I had to downgrade it to 1.6 now am trying to upgrade it back to 1.7 and now have a really messed up install. I've installed the official 1.7 installer from Oracle but it doesn't fix the issue, with either maven or or java. See output below:
> LM-BWI-00873340:jdk1.7.0_67.jdk user$ mvn -v Error: JAVA_HOME is not
> defined correctly. We cannot execute /usr/libexec/java_home/bin/java
> LM-BWI-00873340:jdk1.7.0_67.jdk user$ java -v Unrecognized option: -v
> Error: Could not create the Java Virtual Machine. Error: A fatal
> exception has occurred. Program will exit.
I think my sym links are all screwed up, I have followed various guides out there and now have one screwed up installation.
EDIT - my bash profile
LM-BWI-00873340:~ user$ cat .bash_profile
export JAVA_HOME=/usr/libexec/java_home
export PATH=$PATH:${JAVA_HOME}/bin:
Upvotes: 1
Views: 298
Reputation: 6816
Need to add the following lines to the .bash_profile Make sure this line is after java_home is exported
export PATH=$PATH:${JAVA_HOME}/bin:
Upvotes: 2