Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Just launched an instance of EC2 and I tried doing:

$JAVA_HOME/bin/java -version

it gives me back:

 $JAVA_HOME/bin/java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.1) (amazon-
OpenJDK Client VM (build 19.0-b06, mixed mode)

so I can see that it is installed there. I opened up my bash profile however I don't see what my JAVA_HOME path is? How do I get this? THanks

share|improve this question

2 Answers 2

up vote 2 down vote accepted



env | grep JAVA

share|improve this answer

Your java path is displayed from /etc/profile.d/

If you want to install your own jdk use the following documentation:

share|improve this answer

Your Answer


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.