I am trying to send password to a shell script to run batch jobs.
I am not able to send password to shell script via java standalone application. the java main method cannot return value as its return type is "VOID". please advice me how i can get password in shell script though java standalone.
Due to security i can't use system out or i can't write to a file.
I saw below code in google but its not working for me
That's because the only way to make any Java output anything is using System.out, System.err or System.console() (if available). However, you're explicitly forbidden to use any of these. Therefore you simply cannot do what you need to do.
It's like asking you to tighten a screw without letting you use a screw driver, coin or anything else you can use to tighten a screw.