Shell script and java parameter
You have to mask every parameter in the script as well:
java -cp . Main "$1" "$2" "$3" "$4"
Now parameter 4 should be empty, and $3 should be "a test".
To verify, try:
#!/bin/bashecho 1 "$1"echo 2 "$2"echo 3 "$3"echo 4 "$4"echo all "$@"
and call it
./params.sh This is "a test" 1 This2 is3 a test4 all This is a test