In zsh, to reduce a list of files to the ones that exist, you can use the (N) glob qualifier appended to each element of the list:
files=(/opt/foo/lib.jar /opt/bar/lib.jar)
that_exist=($^files(N))
(($#that_exist > 0 )) && print -rl -- $that_exist
Note that contrary to ls, it can tell whether a file exists or not even if you don't have search access to its parent directory (as long as you still have read access), as it looks for corresponding entries in the directory without trying to access the file.
See also:
that_exist_after_symlink_resolution=($^files(N-^@))
Which selects the files that are not (^) a symlink (@) after symlink resolution (-). Equivalent to using ls -Ld.