Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 63491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:38:27+00:00 2026-05-10T18:38:27+00:00

I like to generate a thread dump programmatically. I’ve learned that there a basically

  • 0

I like to generate a thread dump programmatically. I’ve learned that there a basically two ways to do it:

  1. Use the ‘Java Virtual Machine Tool Interface’ JVM-TI
  2. Use the higher abstracted ‘Java Debugger Interface’ JDI

For the JVM-TI I was able to find some useful information, but I would have to write a JNI-DLL which, at least for the moment, I would like to avoid. With the JDI I can use Java and it seems I’m able to use it from within the application. But I wasn’t able to find some kind of tutorial or HOWTO for it. The only documentation I could find, were the Java-Docs http://java.sun.com/j2se/1.5.0/docs/guide/jpda/jdi/ which isn’t very helpful, because it doesn’t show me how to use this classes.

So, does anybody know of a good tutorial/book I could read?

Thx for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:38:28+00:00Added an answer on May 10, 2026 at 6:38 pm

    Did you consider the remote alternative ? I.e. VisualVM

    thead dump with visualVM

    jps and jstack are also useful tools included in JDK 5, providing a quick command line method for obtaining stack traces of all current threads.

    This article suggest JDI is also used as a remote tool.

    So I am not sure you can triggers a thread dump within your own program, instead you find a way to send to yourself a SIGQUIT signal (kill -3) on Unix platforms, or press the Ctrl-\ key on Unix or Ctrl-Break on Windows platforms.

    Plus, JDI wasn’t intended to be used to debug the same process in which the JDI client is running. Still this thread I just linked to is the closest I have found to actually use JDI within the same program.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 114k
  • Answers 114k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer As MSDN says: "In most cases, the returned handle is… May 11, 2026 at 10:13 pm
  • Editorial Team
    Editorial Team added an answer FWIW here's the LINQ query that'll turn that XML document… May 11, 2026 at 10:13 pm
  • Editorial Team
    Editorial Team added an answer See java.util.Arrays.sort(Object[]) import java.util.*; Arrays.sort(stringarray) May 11, 2026 at 10:13 pm

Related Questions

I like to generate a thread dump programmatically. I've learned that there a basically
If I need generate a fairly large dataset using LINQ and it may take
If you have worked with gui toolkits, you know that there is a event-loop/main-loop
I have an ASP.NET page that I want to be able to generate and
I have a GWT application that displays some charts rendered by JFreeChart. Every few

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.