Hi this video is about how to install Oracle Java 8 in Elementary OS 0.3
This is by hand. Also you can do it by ppa i'll put both method.
How to download Java 8 JDK and setup in ElementaryOS "BY HAND!"
Note: This can be done also in Ubuntu*
1. Go to http://www.oracle.com/technetwork/es/java/javase/downloads/index.html
Dowload -> oracle jdk
1.1 Check your arch
Use uname -a
If appears. i386 or i686, then your OS is 32bit mode
If appears x86_64 you are in 64 bits
2. Select for .tar.gz
Choice a package right for your ARCH
3. Download it
4. Extract to /usr/lib/jvm
ls -l /usr/lib/jvm
If not exist, create
mkdir -p /usr/lib/jvm
4.1 Extract
go to your Download Directory
sudo tar -xvzf jdk.tar.gz -C /usr/lib/jvm
5. Apply correct owner
cd /usr/lib/jvm
chown -R root:root jdk-dir/*
chown -R root:root jdk-dir
6. Create a syslink
ln -s jdk-version java-8-oracle
7. Select Java 8 as default alternative
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/java-8-oracle/bin/java" 0
update-alternatives --install "/usr/bin/java" "javac" "/usr/lib/jvm/java-8-oracle/bin/javac" 0
update-alternatives --install "/usr/bin/java" "javaws" "/usr/lib/jvm/java-8-oracle/bin/javaws" 0
8. Check your selection
update-alternatives --config java
2. Using PPA
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
For Java 8:
sudo apt-get install oracle-java8-installer
Java 7:
sudo apt-get install oracle-java7-installer
###############
# This is OPTIONAL but IMPORTANT
###############
FOR ENABLE JAVA PLUG-IN IN FIREFOX
1. Create this directory
mkdir -p ~/.mozilla/plugins
Now we will create the link to the plug-in remember. Choice the correct one for your ARCH*
For 64bit
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
For i386
ln -s /usr/lib/jvm/java-8-oracle/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
2. How to check if Java is enabled?
Go to
https://www.java.com/es/download/installed8.jsp
###############
# SET YOUR JAVA_HOME
###############
This is important for APPS like Android studio, that needs Java_home, minecraft, and others..
*USE YOUR FAVORITE EDITOR*
sudo vim /etc/profile
#ADD THIS LINES
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=$JAVA_HOME/bin:$PATH
Save and close the file. Just logout and login back to see new changes.
Alternatively, type the following command to activate the new path settings immediately:
Logout and login again.
Verify new settings:
$ echo $JAVA_HOME
$ echo $PATH
$ which java
Comentarios
Publicar un comentario