Score:0

Lost java binary versions and unable to restore them with jre or jdk

us flag

After uninstalling oracle java I lost java command and java --version throws error

java order not found

I'm supposed to have openjdk-8-jre and openjdk-8-jdk and same for openjdk-11-jre and openjdk-11-jdk.

I tried to uninstall and reinstall them in order to restore configuration but after doing:

apt install openjdk-8-jre
apt install openjdk-8-jdk
apt install openjdk-11-jre
apt install openjdk-11-jdk

Still java --version throws an error and update-alternatives --config java throws an error too.

In both, /usr/lib/jvm/java-8-openjdk-amd64/bin/ and /usr/lib/jvm/java-11-openjdk-amd64/bin/ I can find binaries for javac, jar, javah, etc. but not java.

How can I restore java binaries and set them again with update-alternatives --config java?

(I need them for autofirma software, a software to sign documents with digital certificate).

Thank you.

Score:0
us flag

The different jdk packages where broken and I was unable to install them again. So I had to:

apt list --installed | grep jdk
apt remove openjdk*
dpkg -l | grep -i jdk
dpkg --purge openjdk-*

After that, I could

apt install openjdk-8-jdk

And it worked.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.