If you want to pass all the arguments to a command being called from a script user "$@".
#!/bin/bash java -jar foo.jar "$@"