Install openjdk on Rocky Linux

Problem

Install openjdk on Rocky Linux

Problem

I want to setup a Linux server to build Android application, when I run the build it report the following error:

jlink executable /usr/lib/jvm/java-17-openjdk-17.0.10.0.7-2.el8.x86_64/bin/jlink does not exist.

After investigate the problem, it was caused by my installation of openjdk 17, my install command is like below:

sudo dnf install java-17-openjdk

After running the command, there has no jlink in the bin folder.

Solution

The solution of the problem is that I need to install java-17-openjdk-devel.

sudo dnf install java-17-openjdk-devel

After install the package above, the jlink was in the bin folder now.