0

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.

closed as off-topic by Jivings Mar 4 '14 at 6:50

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center." – Jivings
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 Mar 4 '14 at 6:50
  • This is specific to the distribution you are using. A good place to ask would be on the Unix sister site. – Thorbjørn Ravn Andersen Mar 4 '14 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 Mar 15 '14 at 14:36
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.

2

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.

1

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.