JDB Connection - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
JDB Connection

JDB Connection

To start with JDB, it is required to connect it with the JVM. For that purpose, create a JDB session by any of the following ways:-
  1. By using main class
  2. By using runtime environment of JVM.

JDB Session using main class

This is one of the simplest way of creating JDB session. In this approach, JVM is released with the main class of the application which is required to debug.
Follow the below steps:-
  • Compile your main class by typing the below command on console:-
  1. javac MainClass.java  
  • Now execute your program with JDB through the following command:-
  1. jdb MainClass  
Here, MainClass is the name of the class that is required to debug. You can take any name in place of it but that name must represent your main class.

JDB Session using JVM

Another approach for creating JDB session is to attach jdb command with the running JVM. This approach specifies the kind of connection to be made. Follow the below syntax:-
  1. java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n MainClass  
Apart from these two ways, there are various other ways that can be used to create a connection between debugger and JVM and jdb command supports all of them.

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

1 comments:

Unknown said...

Hi Buddie,

Amaze! I have been looking bing for hours because of this and i also in the end think it is in this article! Maybe I recommend you something helps me all the time?
I have a page in that it show connected system names "device" page, user can click on any system it shows login dialog, on success.
a. List page 'listPage' connected system's product is listed , user can click on product item it navigate to next page "product detail page"
b. Product Detail view [Click on Next button], user navigate "Page C"
c. Page-c [Click on Complete Button]

[In this button handle, i will navigate to list page]
this.router.navigate('/listPage');
this.location.replaceState('/devices');


Now If the user click the back button form 'listPage', and once again click back button it navigate to /device page and once again if the user click back button.I expect it should go out of the application stack and it show [initial screen assume google.com]

But, in my case after clicking Complete button, page navigate to list view, and user click back button it shows device list, once again if i click back button, page wont navigate stay on the same page and once again i click back button it move to list view and once again i click back button, it moves to device page.

But great job man, do keep posted with the new updates.

Merci Beaucoup,


Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.