The src.zip is a source package of the Java API classes. As it was pointed out in a comment above, the "src.zip" symbolic link created by the -jdk and-jdk-headless packages links to a .zip file which is actually installed by the corresponding -source package.
This kind of a dependency between packages is best represented by the "Suggests" relationship. It neither fits into the definition of "Depends", nor into the definition of "Recommends". See [1].
--------------------START OF TERMINAL OUTPUT ---------------------------------
$apt-rdepends -s Suggests openjdk-8-jdk | head -4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openjdk-8-jdk
Suggests: openjdk-8-demo
Suggests: openjdk-8-source
Suggests: visualvm
$ apt-rdepends -s Suggests openjdk-17-jdk | head -4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openjdk-17-jdk
Suggests: openjdk-17-demo
Suggests: openjdk-17-source
Suggests: visualvm
---------------------END OF TERMINAL OUTPUT --------------------------
Given the -jdk packages "Suggest" the corresponding -source packages, using apt's '--install-suggests' option is one of the ways to avoid this dangling symbolic link (possibly at the cost of having many unnecessary packages installed).
The src.zip is a source package of the Java API classes. As it was pointed out in a comment above, the "src.zip" symbolic link created by the -jdk and-jdk-headless packages links to a .zip file which is actually installed by the corresponding -source package.
This kind of a dependency between packages is best represented by the "Suggests" relationship. It neither fits into the definition of "Depends", nor into the definition of "Recommends". See [1].
------- ------- ------START OF TERMINAL OUTPUT ------- ------- ------- ------- -----
$apt-rdepends -s Suggests openjdk-8-jdk | head -4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openjdk-8-jdk
Suggests: openjdk-8-demo
Suggests: openjdk-8-source
Suggests: visualvm
$ apt-rdepends -s Suggests openjdk-17-jdk | head -4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
openjdk-17-jdk
Suggests: openjdk-17-demo
Suggests: openjdk-17-source
Suggests: visualvm
------- ------- ------- END OF TERMINAL OUTPUT ------- ------- ------- -----
Given the -jdk packages "Suggest" the corresponding -source packages, using apt's '--install- suggests' option is one of the ways to avoid this dangling symbolic link (possibly at the cost of having many unnecessary packages installed).
[1] https:/ /www.debian. org/doc/ manuals/ maint-guide/ dreq.en. html#control