ps can display the parent process ID, so that if you know how deep you need to go in the tree, and that is apparently the case, you should be able to locate the parent ID with ps and grep and then look for its children in the hierarchy by sed'ing the parent process ID (PPID).
Example:
Code:
PARENT=java_parent
ps -f -u $UID | awk '/$PARENT/ {print $2}'
should give you the process ID of the parent; another run of
ps -f, searching for the PPID in the proper column will allow you to find its children. Once more and you are done.