Score:1

Why update-java-alternatives -s /usr/lib/jvm/java-17-amazon-corretto does not update jexec?

us flag

Ubuntu 22.04.2:

I installed java-17-amazon-corretto and did the update-java-alternatives but I got an error compiling my project. Last time I had to fix the links that were not updated, (java 11 vs javac 8).

If I go under /etc/alternatives and do ls -la |grep java I see different configuration for links:

javah -> /usr/lib/jvm/java-8-openjdk-amd64/bin/javah
jjs -> /usr/lib/jvm/java-11-openjdk-amd64/bin/jjs
javac -> /usr/lib/jvm/java-17-amazon-corretto/bin/javac 

I guessed these executable are not distributed anymore with new JVM.

But this one:

jexec -> /usr/lib/jvm/java-11-openjdk-amd64/lib/jexec

was not updated to /usr/lib/jvm/java-17-amazon-corretto/lib/jexec

When I do sudo update-alternatives --list jexec I get only this:

/usr/lib/jvm/java-11-openjdk-amd64/lib/jexec
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jexec

How come this one was not updated and not visible for the update-alternatives binary?

Is there a better way to check all these 97 links or do I fix them manually?

After manual check there is also jfr with this issue.

Score:1
ai flag

This appears to be an issue with the packaging of java-17-amazon-corretto. I installed on a test Ubuntu 22.04 system and had the same issues.

However when I installed openjdk-17-jdk from Ubuntu's repositories, all the correct alternatives were created.

apt install openjdk-17-jdk

update-java-alternatives -s java-1.17.0-openjdk-amd64
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.