You can use jstack tool which is shipped with JDK. You can use below command:
c:\Java\jdk1.7.0_51\bin\jstack.exe -l Pid >dump.txt
The user executing
jstack.exemust be the same user who owns the JVM process or have sufficient privileges to access it (Administrator for example).
I typically use JVisualVM, which is currently shipped as part of the JDK but apparently will be separate starting with JDK 9.
There are two fairly easy ways to connect JVisualVM to WF when WF is running as a service.
1) Configure the service to log on as some user account instead of as the Local System account. Then if you log on to the machine using the same account, the WF process will be visible.
2) WF exposes JMX over its HTTP port, unless you've changed your WF config to stop it from doing that. You can use this to access WF running as any user.
Start JVisualVM with the cli-client JAR on the classpath:
jvisualvm --cp:a $WFLY\bin\client\jboss-cli-client.jar
Then go to File -> Add JMX Connection. In the connection field, enter:
where $PORT is the port defined in the WildFly configuration file for the management-http socket-binding (9990 by default).