1Z0-811 Exception Handling and Development Tools Practice Question
A developer is using the Oracle Java Platform Debugger Architecture (JPDA) to debug a remote Java application. Which command-line option is required to start the application in debug mode listening on port 5005?
⚠ Common exam trap
Oracle often tests the distinction between deprecated `-Xdebug -Xrunjdwp` and the modern `-agentlib:jdwp` syntax, and candidates may mistakenly choose the deprecated option because it was widely used in older Java versions.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
The `-agentlib:jdwp` option is the modern, recommended way to enable the Java Debug Wire Protocol (JDWP) for remote debugging. It specifies the transport as `dt_socket` (TCP/IP sockets), sets the JVM as the debug server (`server=y`), does not suspend the application on startup (`suspend=n`), and listens on port 5005 (`address=5005`). This is the standard JPDA configuration for attaching a debugger to a running Java application.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
-javaagent:debug.jar=port=5005
Why it's wrong here
This is used for Java agents, not the JDWP debugger.
- ✗
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=5005
Why it's wrong here
This deprecated syntax still works in some older JDK versions but is not recommended for current exams.
- ✗
-Ddebug=true -Dport=5005
Why it's wrong here
These are not valid JVM options for debugging.
- ✓
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
Why this is correct
This is the correct and current syntax for enabling debugging with JDWP.
Go deeper
Related to this question
About these practice questions
This 1Z0-811 question is part of Courseiva's 481-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-811 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-811 exam.