/usr/ucb/ps -auxwww | grep java
Note that "ps -aux" is distinct from "ps aux". The POSIX and UNIX standards require that "ps -aux" print all processes owned by a user named "x", as well as printing all processes that would be selected by the -a option. If the user named "x" does not exist, this ps may interpret the command as "ps aux" instead and print a warning. This behavior is intended to aid in transitioning old scripts and habits. It is fragile, subject to change, and thus should not be relied upon.
On solaris 11, we can also use,
For Java use jps - http://docs.oracle.com/javase/6/docs/technotes/tools/share/jps.html