Reputation: 4951
i have macbook pro and have set java and java home. now it says that your JAVA_HOME is not set correctly. i want to completely remove java and install it again. how can i do this? Thanks.
Upvotes: 0
Views: 447
Reputation: 75346
This sounds like a Java based tool like ant or maven not being able to locate the JDK.
It does not mean you have to reinstall Java (which by the way is pretty hard for OS X) but that you should set your environment variables properly.
For a one shot, just set
export JAVA_HOME=/Library/Java/Home
in your shell, and then run ant or maven in your shell.
Upvotes: 0
Reputation: 2051
Put export JAVA_HOME=$(/usr/libexec/java_home)
in your .profile and java_home will be set correctly.
Upvotes: 3