Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to generate thread dump java on out of memory error?

dump Error Java memory thread
0
Posted

How to generate thread dump java on out of memory error?

0

Your question can be simplified into: • how to generate a thread dump and: • how to catch an out of memory error (don’t pay attention to naysayer here, they’re missing the bigger picture, see my comment) So it’s actually quite easy, you could do it like this: • install a default uncaught exception handler • upon catching an uncaught exception, check if you have an OutOfMemoryError • if you have an OutOfMemoryError, generate yourself a full thread dump and either ask the user to send it to you by email or offer to send it automatically Bonus: it works fine on 1.5 too 🙂

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123