options=( $(cd …&& find …) )– Do not go this way or some day
a filename like a * b.java will surprise you. The line may kinda work after
set -o noglob and with
IFS=$'\n', but the right way is to
cd beforehand, invoke
shopt -s nullglob and finally
options=( ./*.java ). And by "the right way" I mean "if you really want to populate an array with pathnames", not "this will for sure be a part of the answer here". Shells are not general-purpose programming languages; IMO "bash skills" involve acknowledging this, not fighting this.