Skip to content

Commit

Permalink
Merge pull request #956 from sanha/955-MvnOptionForJDK8
Browse files Browse the repository at this point in the history
[#955] Add Maven Option of Local Java Deployment Tutorial for JDK under 9
[ci skip]
  • Loading branch information
Abhay Saxena committed Apr 1, 2019
2 parents a2de423 + 30a1aca commit 997f774
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/tutorials/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ For more details about the `mount` command check the [documentation](/howto/volu
If you need to debug your code with your favourite IDE that's super easy too. You only need to pass a JVM argument and forward the remote port:
* `-e MAVEN_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005` Creates a Docker environment variable that Maven will use to set a JVM argument and awaits for a remote connection on port `5005`. This is for Java 8+, check the Java documentation if you are running a lower version.
* `-e MAVEN_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005` (JDK 9+)
`-e MAVEN_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005` (JDK 5-8)
Creates a Docker environment variable that Maven will use to set a JVM argument and awaits for a remote connection on port `5005`.
* `-p 5005:5005` Tells docker to forward that ports from your local machine.
Then you can use your IDE to start a debug remote session on your local port `5005`
Expand Down
1 change: 1 addition & 0 deletions newsfragments/955.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a substitute Maven debug option for JDK 5-8.

0 comments on commit 997f774

Please sign in to comment.