0

I found this older post: sudo yum install installs only JRE not JDK - Centos

But when I ran sudo yum install java-1.8.0-openjdk-devel I don't see the jdk installed? I checked;

$ sudo alternatives --config java

There is 1 program that provides 'java'.

Selection Command

*+ 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-2.el8_5.x86_64/jre/bin/java)

I do devops, not a developer but the devs asked for me to finish the install and get jdk on there, any advice?

Thanks!

  • I am not a CentOS user, but I always "install" Java from zip/tar. Uncompress, adjust env JAVA_HOME and PATH. Done. – PeterMmm Feb 09 '22 at 19:42

1 Answers1

1

The JDK should be installed after installing this package, you can check with:

sudo alternatives --config javac

The JRE is just installed inside the /jre subdirectory.

nicoulaj
  • 3,463
  • 4
  • 27
  • 32
  • sudo alternatives --config javac There is 1 program that provides 'javac'. Selection Command ----------------------------------------------- *+ 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-2.el8_5.x86_64/bin/javac) – X.Gorilla.X Feb 09 '22 at 20:06
  • does that mean it is installed successfully? thanks for that, I was using the wrong command to check.. silly me, thank you kindly :) – X.Gorilla.X Feb 09 '22 at 20:07