Java Visual VM

Never heard of the tool before a couple of days ago, but I was very impressed with it. A colleague of mine was working on a an application when it went into a deadlock situation. He wasn’t debugging, so we weren’t clear about how we could resolve what had caused the problem.

We fired up Virtual VM (the exe is found within the Java JDK bin folder – jvisualvm.exe), and attached it to the process which was causing the problem. It allowed us to take a thread dump, and even identified the likely candidate for the deadlock within the dump.

Very impressive. 🙂

Making a JFace dialog resizable

OK, so you’ve extended the JFace Dialog class to customize it with your own behaviour, but the dialog size is fixed to the bounds which you initialise it with.  To fix this, you just need to override the isResizable() method on the Dialog interface as follows:

protected boolean isResizable()  {
  return true;

Nothing to it. 🙂