Fedora 28's "JDK" is missing the compiler, javac; How do I properly install it?

2

I installed a fresh download of Fedora Server 28 and it didn't come with Java. Fine. I ran yum list, and found some packages to install and installed all the most suitable looking JDK packages.

Ostensibly, "JDK" is supposed to stand for "Java Development Kit", however, even though I have all this:

javapackages-tools-5.0.0-14.fc28.noarch

java-11-openjdk-11.0.ea.22-1.fc28.i686 tzdata-java-2018e-1.fc28.noarch

java-1.8.0-openjdk-headless-1.8.0.162-3.b12.fc28.x86_64

java-11-openjdk-headless-11.0.ea.22-1.fc28.x86_64

java-11-openjdk-headless-11.0.ea.22-1.fc28.i686

...I have no javac compiler. Or, if it's there, even find can't find it.

I dare say, nothing called JDK should be missing the javac compiler because then it isn't much of a development kit, is it?

Do I have to get this from Oracle?!

Richard T

Posted 2018-08-26T01:49:33.153

Reputation: 427

2Not certain for Fedora but on CentOS=RHEL it's java-$version-openjdk-devel.$arch – dave_thompson_085 – 2018-08-26T05:38:29.693

Answers

1

On fedora, you can find out which package provides a certain command using the following:

rpm -qf `which javac`

Or alternatively with yum:

yum provides `which javac`

Edit: Apparently java-devel is the package you need. (Got this from a Google search)

Edit2: The correct package turns out to be yum install java-$VERSION-openjdk-devel

confetti

Posted 2018-08-26T01:49:33.153

Reputation: 1 625

The answer to the question asked, "Do I have to get this from Oracle?!" is: yum install java-<ver>-openjdk-devel ... You might update the answer for us! – Richard T – 2018-08-26T18:33:24.380

I've edited it, thank you and I'm glad it worked! – confetti – 2018-08-26T19:07:04.353