Created
July 7, 2015 06:58
-
-
Save mritzco/71b6723fdce7a573ee42 to your computer and use it in GitHub Desktop.
Setting JAVA_HOME correctly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Setting up JAVA_HOME correctly | |
###Intro: | |
Spark and maven are not happy with JAVA_HOME set to usr/bin/java, so we need to setup to the real path. | |
In terminal (each line uses the result of the previous one as last parameter, replace as required): | |
``` | |
which java | |
ls -alh /usr/bin/java | |
ls -alh /etc/alternatives/java | |
``` | |
Now in your ~/.bashrc | |
``` | |
export JAVA_HOME=/usr/lib/jvm/java-8-oracle | |
export PATH=$PATH:$JAVA_HOME | |
``` | |
###Log | |
``` | |
$ which java | |
/usr/bin/java | |
$ ls -alh /usr/bin/java | |
lrwxrwxrwx 1 root root 22 Jul 21 2014 /usr/bin/java -> /etc/alternatives/java | |
$ ls -alh /etc/alternatives/java | |
lrwxrwxrwx 1 root root 39 Jul 23 2014 /etc/alternatives/java -> /usr/lib/jvm/java-8-oracle | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment