Hide password from processes in Linux

i have a shell script which calls a java program with username and password arguments.

#!/bin/ksh

#set some classpaths here

#finally run the command
java com.test -u $U -p $P

Now when i run it, the password shows up in the list of processes. I am not the admin on the server so cant change the permissions on ps process. is there any way that i can provide password to this command from a file or using any buffer and it doesn't show up in processes list.

Well, can it accept a password any other way? That depends on the program in question. Reading it from a file or pipe would prevent it from appearing in ps.

Even if you disabled ps, people could get at it other ways.

No its part of a legacy system and cant be changed.
I just want it removed from ps. how can i use pipe or file for that.

If that's truly the only way it will accept a password, and the java program truly can't be modified any more, then:

You can't.