I'M THE AUTHOR AND THIS ANSWER IS INCORRECT AND SHOULD BE DELETED (cannot delete as it is the accepted answer). As pointed out in comments below
it will return the process' working directory, aka current directory. Unless the process itself has changed its working directory then it will be the directory from which the process was started, not the directory of the executable. Bottom line: this answer is incorrect in the context of the question.
Here's one way of doing it.
In Solaris you would use the
pargs -ae <pid> command for this.
The line that says
argv: will tell you what executable is running. This is however not enough as you do not know the current directory of that process when it was started so if arg0 is not fully qualified then you don't have the full path to the running application. Fear not. Look further down in the output of the above command and within the output of the process' environment variables look for
PWD. Combine the two and you have the full path to the executable.
Here's some sample output from a
pargs -ae command: