[SOLVED] Configuring oracle java in debian 10

Everything about X, Gnome, KDE, ... and everything running on it

[SOLVED] Configuring oracle java in debian 10

Postby ratrace » 2020-06-27 07:51

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.
ratrace
 
Posts: 20
Joined: 2015-04-23 07:52
Location: Athens, Greece

Re: Configuring oracle java in debian 10

Postby sickpig » 2020-06-27 08:56

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
sickpig
 
Posts: 412
Joined: 2019-01-23 10:34

Re: Configuring oracle java in debian 10

Postby Head_on_a_Stick » 2020-06-27 09:02

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:
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12316
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: [SOLVED] Configuring oracle java in debian 10

Postby ratrace » 2020-06-27 16:45

Thank you. It worked.

Code: Select all
update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre*****/bin/java" 1
ratrace
 
Posts: 20
Joined: 2015-04-23 07:52
Location: Athens, Greece


Return to Desktop & Multimedia

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable