The question is a bit puzzling to me, not in the least because of the pipe (to tee) that you apparently wish to use. To maintain this functionality, you could use the following script:
#!/bin/ksh
tee output.file < <( java DemoJavaProgram ) &
That's it. The script will terminate, the java program will continue to run in the background, and data output by the java program on stdout will be copied to both stdout and output.file.
I note that simply running ps -aux | grep scriptName.ksh may mislead you into believing that the script is still running, since the process substitution <(...) is likely run in/from a subshell process that bears the name of the original script, but is actually a child of tee. The parent, i.e. the above script, will have died, as should be apparent from the PPID (i.e. Parent PID) value that you can inspect with, for instance, ps -o pid,ppid,tty,comm -H.