Remove openJDK and add Oracle


3 posts
by mmaceachran » Sun Apr 09, 2017 12:14 am
I have a Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
It aparantly comes with OpenJDK 7 when I run the java -version I get this:

java version "1.7.0_121"
OpenJDK Runtime Environment (IcedTea 2.6.8) (7u121-2.6.8-2~deb8u1+rpi1)
OpenJDK Zero VM (build 24.121-b00, interpreted mode)

I tried running sudo apt-get install oracle-java8-jdk but I get this response:

oracle-java8-jdk is already the newest version.

so it seems that i have that too... ? Can someone explain what is happening here?

Can someone tell me where the Oracle Java is, how do I remove OpenJDK 7, and set my JAVA_HOME to Oracle 8.
Posts: 1
Joined: Sat Apr 08, 2017 11:02 pm
by fruitoftheloom » Sun Apr 09, 2017 10:12 am
mmaceachran wrote:I have a Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux
It aparantly comes with OpenJDK 7 when I run the java -version I get this:

java version "1.7.0_121"
OpenJDK Runtime Environment (IcedTea 2.6.8) (7u121-2.6.8-2~deb8u1+rpi1)
OpenJDK Zero VM (build 24.121-b00, interpreted mode)

I tried running sudo apt-get install oracle-java8-jdk but I get this response:

oracle-java8-jdk is already the newest version.

so it seems that i have that too... ? Can someone explain what is happening here?

Can someone tell me where the Oracle Java is, how do I remove OpenJDK 7, and set my JAVA_HOME to Oracle 8.


Have you fully updated Raspbian Jessie with Pixel, if that is the Operating System installed ?????

Code: Select all
sudo apt-get update
sudo apt-get dist-upgrade



I have installed no extra Java related packages and the following:

Code: Select all
uname -a
Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux


Code: Select all
java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)


Searching for packages I have "oracle-java8-jdk Java™ Platform, Standard Edition 8 Development Kit " installed
.
Ex Computer Repair & Service Technician.
RPi 3B, HP Envy 4500 Wireless Printer, Google Chromecast, Android Smart Phone, HD 1080p TV and 3/4G Mobile Internet make ideal companions.
Posts: 14156
Joined: Tue Mar 25, 2014 12:40 pm
Location: Bognor Regis UK
by sm2345110 » Fri May 05, 2017 7:43 am
The syntax is given below for the JAVA:-
for removing the JDK:-
sudo apt-get purge openjdk-\*
and add Oracle:-
Sudo cp -r jdk-8u51-linux-x64.tar.gz /usr/local/java/

All the Best :)

JAVA Training at CETPA..
Posts: 2
Joined: Thu May 04, 2017 6:19 am