In Bash:
#!/usr/bin/env bash
java /path/to/JavaFoo "$@"
to pass all parameters individually quoted as passed to the Bash script itself.
Works with Dash as well, but I don't know about other Bourne-compatible shells.
Say you want to pass all but the first parameter to the shell script on to the Java program, use shift like this:
#!/usr/bin/env bash
shift
java /path/to/JavaFoo "$@"
Use more instances of shift to get rid of more parameters before passing them on, if needed.
So say you call the shell script (myscript) as follows:
./myscript a b c
the shift will get rid of a. Add one more shift and it also gets rid of b. The name of the script itself is not included in "$@" even though you can access it as $0 in many shells.