I have installed JDK 8 on my Pi but it is still showing JDK 6.. Photo for reference: java versions comparison

How to I change it so that applications use JDK 8 now? Thank you.

  • I'm closing this question, as it does not appear to be specific to the Raspberry Pi within the scope defined in the help center.
    – Jivings
    Commented Mar 4, 2014 at 6:50
  • This is specific to the distribution you are using. A good place to ask would be on the Unix sister site. Commented Mar 4, 2014 at 8:12
  • If you have not already read this, have a look at the part pertaining to $PATH (point #3), and the comment at the end about lightdm.
    – goldilocks
    Commented Mar 15, 2014 at 14:36

3 Answers 3


If 1.8 is what comes up for java -version (it does in your screenshot) then that is the one being used by default.

You should not have to change anything.


Like Goldilocks said, if java -version is showing 1.8, that is what is being used.

The only reason I can think that the desktop version is saying 1.6 is because the .desktop file for the JRE or the shortcut on the menu didn't get updated. I can't confirm this or give a way to fix it right now, as my Pi is fried :'( but everything should be using 1.8.


If for some reason it is actually using 6 to open the file, you can probably use the "Open with..." entry to specify the command line necessary to run a jar file, e.g. java -jar file.jar if I recall correctly, and specify that as the default run command. (You may need to hunt down the correct location for the Java 1.8 binary though first, not just the environment link.)

Not the answer you're looking for? Browse other questions tagged or ask your own question.