পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Friday, January 20, 2017

JDB - Session

This chapter describes how to start a JDB session in different ways. JDB launch is the frequently used technique to start a JDB session.
There are two different ways to start a JDB session:

  • Starting JDB session by adding class (main class name) to it.
  • Adding JDB to running JVM to start session.

Start a Session by Adding Class

The following command starts a JDB session:

Syntax

\>jdb <classname>

Example

Let us assume we have a class named TestClass. The following command starts a JDB session from the TestClass.
\>jdb TestClass
If you follow this command, it starts a new Java VM with any specified parameters. Thereafter it loads the class and stops it before executing the first statement of the class.

Start a Session by Adding JDB to a Running JVM

Given below is the syntax and example to start a JDB session by adding the JDB to a running JVM.

Syntax

The following syntax is for JDB session:
-agentlib:jdwp=transport=dt_shmem,address=,server=y,suspend=n

Example

Let us assume the main class name is TestClass and JVM allows the JDB to connect it later. The following is the command to add JDB to JVM:
\>java
-agentlib:jdwp=transport=dt_shmem,address=jdbconn,server=y,suspend=n TestClass
Now you can attach the JDB to the JVM with the following command:
\> jdb -attach jdbconn
Note: Here, the TestClass is not added to the JDB command, because JDB is connected to the running VM instead of launching a new one.

No comments:

Post a Comment