0

Is it as simple as

sudo apt-get install openjd-8-jdk

I already have openjdk-7 installed, will the above command just overwrite it?

Will the latest version be used, despite having multiple versions installed?

Or do I have to remove openjdk-7?

12
  • You can have both installed.
    – Pilot6
    Mar 17, 2016 at 14:12
  • But you'll have to choose your default I believe. Mar 17, 2016 at 14:13
  • @Zacharee1 That is correct.
    – Pilot6
    Mar 17, 2016 at 14:13
  • @Pilot6 Do you want to answer, or can I? Mar 17, 2016 at 14:14
  • 1
    The short answer is that you just install that package and set a default java using update-alternatives. You can use either one installed.
    – Pilot6
    Mar 17, 2016 at 14:28

1 Answer 1

0

So, it's that simple, just install

sudo apt-get install openjdk-8-jdk

the latest version will be used, even if you have openjdk-7-jdk or any other.

I also installed openjdk-8-doc, openjdk-8-jre, openjdk-8-jre-headless, because they were installed for openjdk-7.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .