Yes, take a look at getting a list of threadsgetting a list of threads. Lots of examples on that page.
That's to do it programmatically. If you just want a list on Linux at least you can just use this command:
kill -3 processid and the VM will do a thread dump to stdout.