0

Okay here is my issue. Every time I install a .deb installer of a program that requires java. OpenJDK hijacks my system and sets it as default Java. I don't want to use OpenJDK, if I did I wouldn't be asking this question

Whenever I install a .deb package however, it installs OpenJDK and sets it as the default JDK. Which means when I have to use programs that don't work very well with OpenJDK I have to

sudo apt-get purge openjdk*

Then run the Oracle JDK .deb package to reinstall it. I don't want to have to do this, or switch from OpenJDK to Oracle's official JDK. It is time wasting. Is there anyway to stop OpenJDK from hijacking my system and setting itself to the default JDK?

Note: I call it hijacking, because it is replacing the JDK I installed with a .deb created with alien from the official jdk rpm. I don't want to use it, it doesn't ask me if it can be installed and be used as the default JDK/JRE.

2 Answers2

0

Maybe setting the Oracle Java JRE/JDK as default will solve your problem: How to set default Java version? or Setting JDK 7 as default

Simply put in command line:

sudo update-alternatives --config java

And select the version you want to be default.

Leo
  • 3,644
0

I think your question is duplicate with this one as you want to control default jre : How to set default Java version?

yilmi
  • 1,282