Jdb-options
提供:Dev Guides
JDB-オプション
この章では、jdbコマンドで引数として送信される、JDBで使用可能な重要なオプションについて説明します。
オプション
次の表には、JDBで受け入れられるオプションのリストが含まれています。
Name | Description |
---|---|
-help | Displays the help message and lists the related options. |
-sourcepath | Uses the given path for source files if path is not specified, then it takes the default path “.”, i.e., the current directory. |
-attach | Attaches the debugger to the running VM by specifying the running VM address. |
-listen | Waits for the running VM to connect using standard connector. |
-listenany | Waits for the running VM to connect using any address. |
-launch | Launches the debugged application immediately up on startup job. |
-listconnectors | Lists the connectors available in this VM. |
-connect | Connects to the target VM using named connector with listed argument values. |
-dbgtrace | Prints information for debugging jdb. |
-tclient | Runs the application in Java Hotspot VM (client). |
-tserver | Runs the application in Java Hotspot VM (server). |
-Joption | Passes the option to the Java virtual machine used to run JDB. |
コマンドでオプションを使用する
次のコマンドは、上記のオプションの一部を使用する方法を示しています。
-help
次のコマンドは、JDBの使用に関する-helpを取得します。
\>jdb -help
-添付
次のコマンドは、指定されたVM(ポート番号:1099)にデバッガーを接続します。
\> jdb -attach 1099
-聴く
次のコマンドは、標準コネクタ(8008のVM)を使用して、現在のVMで実行されているJDBプロセスを待機させます。
\>jdb -listen 8088
-聞き取り
次のコマンドは、任意のコネクタ(現在実行中のポートのVM)を使用して、現在のVMで実行されているJDBプロセスを待機させます。
\>jdb –listenany
-tclient
次のコマンドは、Java Hotspot(™)VM(client)でアプリケーションを実行します。
\>jdb –tclient
-tserver
次のコマンドは、Java Hotspot(™)VM(server)でアプリケーションを実行します。
\>jdb -tserver