When do you get that error? And does running just the java_home part return what's expected? It looks more like something that's using JAVA_HOME is confused.
– Dave Newton
It appears in the terminal immediately after running the $export command. What do you mean by running just the java_home part? If I run that command without the $export there's no error
– Gruntcakes
Ah, ha; there's no $export command. There's an export command. The $ is the default shell prompt. (Well, was; I don't see it much anymore IRL.)
– Dave Newton
1 Answers
3
votes
You have to leave the preceding dollar-sign off (export instead of $export):
export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
java_home
part return what's expected? It looks more like something that's usingJAVA_HOME
is confused. – Dave Newton$export
command. There's anexport
command. The$
is the default shell prompt. (Well, was; I don't see it much anymore IRL.) – Dave Newton