Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 622  / 1 Year ago, sun, april 16, 2023, 6:15:34

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.


More From » java

 Answers
4

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.


[#27877] Sunday, April 16, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
curatekill

Total Points: 376
Total Questions: 117
Total Answers: 102

Location: Wales
Member since Mon, May 17, 2021
3 Years ago
curatekill questions
Fri, Sep 30, 22, 17:23, 2 Years ago
Sun, May 21, 23, 23:32, 1 Year ago
Sat, May 15, 21, 11:19, 3 Years ago
;