After asking the question Can I indicate that a .deb package depends on Java, but not specify what implementation (e.g. OpenJDK, IcedTea, Oracle)?, I was helpfully informed that I could include a dependency of
default-jre when building my package, which would automatically find an appropriate version of Java to install before installing the package.
However, when I try to do the same for a .rpm package, I instead get the following error:
Could not depsolve transaction; 1 problem detected:
- nothing provides default-jre needed by
How can I get
default-jre to work with a .rpm package as it does with a .deb package?
To be clear, I want this to be an automatic dependency so that a user can take the .rpm package and install the app (and Java if not already installed) without needing to do anything on their own.