How to pass decrypted password to script

Hi Everybody,

I am trying to write a script (ksh) to connect to oracle db via sqlplus.
As I do not want the password to be in plain text, I've tried to use java to encrypt and decrypt it but I am not sure how can I pass the decrypted password to the script. Pls advise.

Below is what I would like to achieve :

connect username/decrypted password@sid

Rgds,
Nick

connect username/$(java DecryptionClass)@sid