1

I need OpenJDK's build that provides symbols for debugging in RedHat Linux Server 8.2. I had installed OpenJDK 1.8.0 252-* (latest) with:

yum install java-1.8.0-openjdk-devel

However, afterward I realize that I need a package that has been built with debugging enabled and also I was interested in a very specific version (242-*), so I downloaded it directly from RedHat Acces site (this link).

After installing it with rpm (rpm -ivh java-1.8.0.....), and chmoding everything to 774, when I navigate to java directories, I don't seem to be able to execute java (or in this case java.debug):

[root@localhost lib]# /usr/lib/debug/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b07-1.el6_10.x86_64-debug/bin/javac.debug -version
-bash: /usr/lib/debug/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b07-1.el6_10.x86_64-debug/bin/javac.debug: No such file or directory
[root@localhost lib]# /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.252.b09-2.el8_1.x86_64/bin/java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

Am I missing something?

NuCradle
  • 665
  • 1
  • 9
  • 31

1 Answers1

1

java-1.8.0-openjdk-debuginfo is a complementary package that provides debug symbols for OpenJDK binaries. This package is not self-sufficient; it does not contain executable binaries.

In order to use OpenJDK with debug symbols, you need to install both java-1.8.0-openjdk and the corresponding java-1.8.0-openjdk-debuginfo package of the same version.

apangin
  • 92,924
  • 10
  • 193
  • 247
  • I'm confused as the RedHat links I've been looking at show several editions of the same version, e.g. `openjdk` (235k), `openjdk-debug` (237k), `openjdk-debuginfo` (102m), `openjdk-devel` (11m), `openjdk-headless` (33m). I tried to install `openjdk` but apparently it needs `openjdk-headless` which reflexively needs `pcsc-lite-libs`. It seems like doing it this way will lead to a lot of dependency downloads. I tried `yum --showduplicate list java-1.8.0-openjdk` (and `openjdk-devel`) but didn't see my minor version, and also doesn't have `-debug`. How do I go about this? – NuCradle May 05 '20 at 22:05
  • 1
    @NuCradle "How to install a package of a specific version in RHEL" - this is a completely different question. It's not about programming and is too long for a comment, so I'd suggest to post another question on unix.stackexchange.com – apangin May 05 '20 at 23:07
  • Thanks. You are right; I tend to veer off the tangent sometimes. I posted another related [question](https://stackoverflow.com/questions/61626400/how-to-determine-whether-openjdk-installed-with-debugging-symbols) to confirm whether the debugging was installed correctly (not a Unix question). – NuCradle May 06 '20 at 02:36