-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjava_inst.txt
42 lines (25 loc) · 969 Bytes
/
java_inst.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
============
Java install
============
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-jdk7-installer
# After the installation you have enable the jdk
update-alternatives --display java
# Check if Ubuntu uses Java JDK 7
java -version
# If all went right the answer should be something like this:
# java version “1.7.0_25″
# Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
# Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)
# Check what compiler is used
javac -version
# It should show something like this
# javac 1.7.0_25
# Add JAVA_HOME to environment variable
# Edit /etc/environment and add JAVA_HOME=/usr/lib/jvm/java-7-oracle to the end of the file
sudo nano /etc/environment
# Append to the end of the file
JAVA_HOME=/usr/lib/jvm/java-7-oracle
# Log in and out (or reboot) for the changes to take effect.
# If you want to remove oracle JDK
sudo apt-get remove oracle-jdk7-installer