If the threads involved are each using the synchronized keyword to lock on (or attempt to lock on) the various monitors involved, then once deadlock occurs, there's no way out other than maybe Thread.destroy(), as Ulf said.
However, since JDK 5 it's been possible to use java.util.concurrent.locks.Lock instead of the synchronized keyword. The resulting code is more verbose but has many more options for handling locks. In particular, if you never use the lock() method, but instead use lockInterruptibly() or tryLock(), then it becomes possible to write code that gets out of a prospective deadlock. Which technically means it wasn't a deadlock if you can get out of it.

But you can get out of situations that would have otherwise been deadlocks if using synchronization. Writing such code would still be rather complex; I don't have a ready quick example. But at least it's possible.
Oh, and java.util.concurrent.locks.ReentrantLock has additional methods that could be useful. Things like getOwner(), getQueuedThreads(), isLocked(), isHeldByCurrentThread(), etc. Lots of possibilities there.