Yokosumari
Posts: 1
Joined: Sat Feb 06, 2016 11:24 am

Cannot upgrade RPi to JDK 1.8

Sat Feb 06, 2016 11:32 am

Hello. I've been trying to troubleshoot this issue, but I haven't had much luck. When I run "sudo apt-get install oracle-java8-jdk" everything installs fine. However when I run "java -version" it's still coming up as version 1.6. How do I remedy this?

Navyscourge
Posts: 258
Joined: Sat Oct 24, 2015 1:50 pm

Re: Cannot upgrade RPi to JDK 1.8

Sat Feb 06, 2016 2:15 pm

Are you running the latest Jessie Raspbian? How and when did you install it?

My Jessie gives

Code: Select all

pi@raspberrypi ~ $ java -version
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) Client VM (build 25.0-b70, mixed mode)
What do you get from

Code: Select all

apt-cache policy
That should show either jessie or wheezy

johnnyalpha8
Posts: 6
Joined: Sat Feb 06, 2016 7:06 pm

Re: Cannot upgrade RPi to JDK 1.8

Sat Feb 06, 2016 7:29 pm

You can edit .bashrc in your home directory. Add two lines:

alias java=/path/to/your/java/binary
alias javac=/path/to/your/javac/binary

:)

Return to “Troubleshooting”