1

I want to add /opt/jdk-16.0.2 to update-java-alternatives, but there is no .jinfo file. File should be there, because I have openjdk 16.0.2

I had no problems with adding java to update-alternatives java command, but I don't want to do it with every java-related binary.

I installed openjdk by extracting it from archive and changing JAVA_HOME to /opt/jdk-16.0.2 Should I do something more? Can I generate .jinfo file?

I'd like to use update-java-alternatives to switch between Java versions. I don't want to play with scripts and update-alternatives java

https://askubuntu.com/a/388693

update-java-alternatives requires presence of a file with extension .jinfo in directory /usr/lib/jvm. The opendjk package is shipped with a .jinfo file, the jdk of Oracle (formerly Sun) is not. As alternative, you configure alternatives without update-java-alternatives:

  • What is your Ubuntu version? Why do you not want to use official deb-packages which [provide this file](https://packages.ubuntu.com/search?suite=focal&arch=any&mode=exactfilename&searchon=contents&keywords=jinfo)? – N0rbert Oct 16 '21 at 07:24
  • Because I want to use newer version of JDK – user3565923 Oct 16 '21 at 12:18
  • I used oracle jdk installer from https://launchpad.net/~linuxuprising/+archive/ubuntu/java – user3565923 Oct 16 '21 at 13:19

0 Answers0