Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to finds a way to install the Java SDK (javac) on Scientific Linux 64bit with yum or anyway.. Can someone please tell me the best what to do this so I can use maven for my builds etc

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Just download the SDK from Oracle, place it in a suitable directory like /opt/java.

chmod it, i.e.:

chmod 744 jdk-6u37-linux-x64.bin

unpack it, i.e.:

./jdk-6u37-linux-x64.bin

symlink it, i.e.:

ln -s jdk1.6.0_37/ jdk

set environment variables in /etc/profile.d/java.sh, e.g. (for ant but you get the idea):

export JAVA_HOME=/opt/java/jdk
export ANT_HOME=/opt/java/apache/ant
export PATH=${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}

Cheers

share|improve this answer
add comment

Another option is to install the openjdk available via the distribution.

yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.