java - Making sure JAVA_HOME is correctly set -


pretty new java , mac ... want make sure java_home set in other programs can use path. did googling , here got:

if enter /usr/libexec/java_home in terminal this: /system/library/java/javavirtualmachines/1.6.0.jdk/contents/home if enter echo $java_home in terminal, don't back.

can please tell me going on in here?

thanks.

java_home isn't set default on osx. can resolve opening terminal , executing following:

echo "export java_home=`/usr/libexec/java_home`" >> ~/.profile . ~/.profile 

this cause java_home set on startup (rather current session), , add it.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

c++ - Accessing inactive union member and undefined behavior? -

php - Get uncommon values from two or more arrays -