Packages that indicate use of external libraries are termed "dummy" packages. Conda Forge provides them for `mpich` (
see docs). There is
a StackOverflow example for a `clang` one.
I'm really not sure you'd need to create links or manipulate environment variables - the point of the dummy build is to let the system/user-level variables pass through (let PATH do its job).
The key issue is that other packages will depend on `openjdk` explicitly, so you have to create a dummy `openjdk` package and just assume things are set correctly at the system-level. What might be nice would be to use an activate script in your dummy package to verify that the environment variables and executables you expect the system to provide are accessible.