Yesterday upgrade Mac OS to Yosemite, because it is the overall upgrade of the system, there are some in the settings will be lost, this is something, first of all, I have to execute a program that requires Java to participate in the following error:
Error:java_home is not defined correctly.
We cannot Execute/system/library/frameworks/javavm.framework/versions/currentjdk/home/bin/java
Check the information, get Apple recommended you set the Java_home as /usr/libexec/java_home
follows:
$ vim .bash_profile export JAVA_HOME=/usr/libexec/java_home$ source .bash_profile
I draw the gourd, the result of the mistake became We cannot execute /usr/libexec/java_home/bin/java
...
Continue to check, the original to export
change the wording can be:
$ vim .bash_profile export JAVA_HOME=$(/usr/libexec/java_home)$ source .bash_profile
Others, such as I have the following aliases:
alias setsublime=”sudo ln -s \”/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl\” /bin/subl”
This is to inject a command line subl
to open the sublime, the result also to copy this sentence to perform the execution of their own to be effective
Troubleshooting Java errors after upgrading Yosemite