Thursday, April 16, 2009

Install Java on CentOS

Eclipse requires the new JAVA (>1.5). And CentOS 5.3 can only provide java1.4.2. To install new Java, do following:
1) go to java.com and download the package for linux
2) install that package.
3) Modify the "PATH" environment variable to use the new Java
create (or edit) /etc/profile.d/java.sh file, example below;
export JAVA_HOME="/usr/java/jre1.5.0_11/bin"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"

4) remove the old java:
mv /usr/bin/java /usr/bin/oldjava

5) logoff and login again
Ref: http://www.smithproject.org/forum/posts/list/17.page

No comments: