2

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-44.1.9.1.21.amzn1-i386)
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

2

echo $JAVA_HOME

or

env | grep JAVA

-1

Your java path is displayed from /etc/profile.d/aws-apitools-common.sh

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

https://evandhoffman.wordpress.com/2011/11/16/installing-sun-oracle-jdk-1-5-on-an-ec2-instance/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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