1. Find where Java lives:

[html]
which java
[/html]

2. Set JAVA_HOME:

[html]
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-2.b11.30.amzn1.x86_64/
[/html]

3. Set the Java path:

[html]
export PATH=$PATH:$JAVA_HOME
[/html]

4. Confirm path is set (as above) correctly:

[html]
echo $JAVA_HOME
[/html]

Written by Matt Cooper
Hi, I'm Matt Cooper. I started this blog to pretty much act as a brain dump area for things I learn from day to day. You can contact me at: matt@matthewc424.sg-host.com.