Bazel: relax Java dependency (#17734)
Bazel: relax Java dependency (#17734)

* Bazel: relax Java dependency

* Flake8 fix
LLNL/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack