While installing Android Studio on Ubuntu 14.04 I get the message that my Java version (javac 1.7.0_79
) is causing problems. I found a solution of how to install a newer Oracle version of Java:
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
However I'm afraid that this might overwrite my existing open-jdk
version of Java. Since I don't know which of my programs depend on Java, I fear that this could crash these other programs.
Is there a way to make sure apt-get
doesn't overwrite my previous Java? I would basically like to have installed both and be able to switch between them manually, depending on what version I need.