I don't quite understand your question
In your code Java code, it doesn't seem to print anything. If you invoke test.sh, of course you won't see anything.
If let's say you have a Hello World program, then you run it from your script, I'm pretty sure you can see the Hello World message in your shell.