Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Configuring oracle java in debian 10

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
ratrace
Posts: 26
Joined: 2015-04-23 07:52
Location: Athens, Greece
Has thanked: 1 time

[SOLVED] Configuring oracle java in debian 10

#1 Post by ratrace »

From oracle site i downloaded the file "Linux x64 Compressed Archive" for my 64-bit, debian 10 system.

As root user i created the folder /usr/local/java, moved in the folder the downloaded file and install it with the command tar zxvf jre-****.tar.gz. After the installation i deleted the .tar.gz file.

I'm trying with the command update-alternatives --config java, to make oracle java the default java program, but when i give the above command, the outcome is,

Code: Select all

There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-11-openjdk-amd64/bin/java
Nothing to configure.
How can i set the oracle java as the default java program instead of openjdk?
Last edited by ratrace on 2020-06-27 16:40, edited 1 time in total.

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: Configuring oracle java in debian 10

#2 Post by sickpig »

you need to install the new option

Code: Select all

update-alternatives --install link name path priority [--slave link name path]...
in slave specify the existing java package's details

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Configuring oracle java in debian 10

#3 Post by Head_on_a_Stick »

It's very easy to wreck an alternative when attempting to add a new option manually via the command line[0] so perhaps use the GUI instead: https://packages.debian.org/buster/galternatives

[0] Well, it was easy for me :mrgreen:
deadbang

ratrace
Posts: 26
Joined: 2015-04-23 07:52
Location: Athens, Greece
Has thanked: 1 time

Re: [SOLVED] Configuring oracle java in debian 10

#4 Post by ratrace »

Thank you. It worked.

Code: Select all

update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre*****/bin/java" 1

Post Reply