Setting JAVA_HOME after automatic update of Java to the latest version
Hello,
I have a problem to run some java application scripts after the automatic update of Sun's JRE from 1.6.0.13 to 1.6.0.14. More specifically, I run a script that initializes the application, setting the variables it uses. I get the following error: line 93: /usr/lib/jvm/java-6-sun-1.6.0.13/bin/java: No such file or directory which makes sense, as the new installed version is 1.6.0.14. Executing: Code:
java -version However, Code:
echo $JAVA_HOME Anyone knows how to change this? |
Just edit your ~/.bashrc file, and add the line defining your JAVA_HOME variable, such as:
Code:
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.14/ Also a handy way to avoid update problems in the future is to create a symbolic link to your java folder. Basically you point all your variables to a "shortcut", and then you only have to update that shortcut to point to the newest java version, instead of going through all your config files and IDEs to try to find where you defined the java folder. Let me demonstrate what I mean, since I don't think that came off as clear... Navigate to the parent directory of your java folder, and then run: Code:
ln -s /usr/lib/jvm/java-6-sun-1.6.0.14/ currentjava Code:
lrwxrwxrwx 1 root root 21 2009-03-04 15:56 currentjava -> /usr/lib/jvm/java-6-sun-1.6.0.14/ |
All times are GMT -5. The time now is 09:25 PM. |