The standard way of indicating that a
.deb package requires a Java runtime environment (the JVM, not the JDK) is to specify a dependency on
default-jre-headless (the former for programs with GUIs, the latter if no GUI is necessary), with alternative dependencies on the appropriate versions of
java6-runtime if your application uses Java 6 or later,
java7-runtime for Java 7 or later, etc.):
Depends: default-jre | java6-runtime
Depends: default-jre-headless | java6-runtime-headless
This handles all the Debian-provided JREs (or Debian derivatives), and the Oracle JREs if they were processed using
default-jre depends on the default JRE (OpenJDK 7 for Debian 8, OpenJDK 8 for Debian 9, OpenJDK 11 for Debian 10), so if no other JRE is installed, this ensures a JRE is installed. The various JRE packages provide
java-runtime variants depending on their level of support, so depending on that means that any existing, compatible JRE, suitably packaged, will be used instead of forcing the user to install yet another JRE.
If you really want to support any installed JRE though, including manually-installed, unpackaged Oracle JREs, you can only use the above in the package's "Recommends" stanza, and then try running
java from your startup script. Ideally you should check for the presence of a JRE at installation time (in
postinst, but making sure you don't fail the install if no JRE is found), and whenever you need to run
java — which may be complicated if your package contains an initscript or systemd unit or the like (complicated in the sense that it's not obvious how to notify the administrator that something is wrong, in a way you can be sure will be noticed and understood).