How to know what class is running in Unix?
===

I have a class that is being executed through a script in unix. Inside of the script the class is being run like this:

    java -cp $CLASSPATH myPackage.component.MyMainClass $PROPERTIES_PATH/myMainClassProperties.properties

That shell needs to be monitored in order to see whether it works correctly or it fails, and it also is going to be run parallely with a different parameter file. So, my questions are:

- How can I know what class is being executed if I use *top*. Is that possible?**
- Is there a way to uniquely identify the class so it doesn't crash when running parallely?
- Will it always be shown as myPackage.component.MyMainClass in the table of processes?

When I say parallely, I refer to something like:

    java -cp $CLASSPATH myPackage.component.MyMainClass $PROPERTIES_PATH/myMainClassProperties.properties

and in another window/session/job

    java -cp $CLASSPATH myPackage.component.MyMainClass $PROPERTIES_PATH/mySomeOtherProperties.properties

**When I say so, is because top shows something like this:
<pre>
PID	USERNAME	THR	PRI	NICE	SIZE	RES	STATE	TIME	CPU	COMMAND
8545	batman	47	4	10	190M	112M	sleep	0:04:00	0.07%	java
9022	joker	91	4	10	286M	211M	sleep	0:01:00	0.09%	java
</pre>
Thanks.