0

I'm new to linux, I don't understand symbolic links, how apt-get works or how to get back removed files. Almost all commands here are from searching for a solution to the problem.

When I run update-java-alternatives -l I get

java-1.11.0-openjdk-amd64      1111       /usr/lib/jvm/java-1.11.0-openjdk-amd64
java-1.17.0-openjdk-amd64      1711       /usr/lib/jvm/java-1.17.0-openjdk-amd64

But when I attempt to do ls or cd to /usr/lib/jvm/java-1.17.0-openjdk-amd64 I get the error that it doesn't exist.

While I was trying some things I removed the directory, and now I can't get it back, don't know what to install and is not in the recycle bin. Attempted the following commands

sudo apt-get install openjdk-17-jdk // already installed
sudo apt-get install openjdk-17-jre // already installed

I need to get the directory to select it as the home folder for IntelliJ IDEA JRE and be able to run a Spring Boot >6.0 application, since java 11 needs Spring Boot 5.3. ls /usr/lib/jvm/ returns

default-java  java-1.11.0-openjdk-amd64  java-11-openjdk-amd64  java-17-openjdk-amd64  openjdk-17

As you can see I have the directory java-1.11.0-openjdk-amd64 which works fine when selecting it as home directory in the Intellij IDE, but I need the java-1.17

Also did this with JAVA_HOME and attempted sudo apt-get install java-1.17.0-openjdk-devel but no package found.

  • Try reinstalling: https://superuser.com/questions/102449/how-to-reinstall-a-package-using-apt-get – tgdavies Jan 15 '23 at 03:53
  • Reinstalled openjdk-17-jdk and openjdk-17-jre, the folder is still not there. `0 upgraded, 0 newly installed, 1 reinstalled, 1 to remove and 1163 not upgraded.` – LautaroColella Jan 15 '23 at 03:57
  • 1
    (1) `sudo apt-get remove openjdk-17-jdk` (2) `sudo apt-get install openjdk-17-jdk` (re-install jdk 17) (3) But , Installing sdkman is a better option. (https://sdkman.io/install) – life888888 Jan 15 '23 at 07:13
  • Already attempted the commands 1 and 2, the folder is still not there. Installed the tool you send but trying to `sdk install openjdk-17-jdk` returns that is not a valid candidate. In the sdkman.io/jdks#open the available package is `java x.y.z-open` how do I install openjdk-17 with sdkman? – LautaroColella Jan 15 '23 at 17:12
  • I did `sdk list java` to see all the versions and at the end it said "Do sdk install java for the default version java 17.0.5-tem" I did it and now I'm able to select it in the Idea IDE. Thank you, solved – LautaroColella Jan 15 '23 at 17:23

0 Answers0