CUSTCOM-264 Client mode debugging (server=no) doesn't work with JDK>=9 #4633
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a bug fix. Github ticket: #4619
Since Java 9 JDWP agent listens only local network interface by default so remote connections would be rejected. In this PR, If server mode is enabled then address port is prefixed with
*:
to enable remote connection. Unfortunately, the*:
syntax is not backward compatible to Java 8 hence debug address requires an update on runtime.Important Info
Testing
New tests
Payara/nucleus/admin/launcher/src/test/java/com/sun/enterprise/admin/launcher/JavaConfigTest.java
Lines 56 to 78 in 8dc6dd0
Testing Performed
Tested manually with IntelliJ IDEA 2020.1 patched with
glassfishIntegration.jar
on JDK8/11.Testing Environment
Windows 10, JDK 11.0.3, JDK 1.8.0_172, IntelliJ IDEA 2020.1