You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference-manual/native-image/guides/build-and-run-native-executable-with-remote-jmx.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Make sure you have installed a GraalVM JDK.
31
31
The easiest way to get started is with [SDKMAN!](https://sdkman.io/jdks#graal).
32
32
For other installation options, visit the [Downloads section](https://www.graalvm.org/downloads/).
33
33
34
-
1. Save the following code to a file named _SimpleJmx.java_. The application `main()` method registers a custom MBean, then loops endlessly, so you have time to inspect the process using VisualVM.
34
+
1.Create and navigate to a directory named _jmx-test_. Save the following code to a file named _SimpleJmx.java_. The application `main()` method registers a custom MBean, then loops endlessly, so you have time to inspect the process using VisualVM.
35
35
```java
36
36
importjavax.management.MBeanServer;
37
37
importjavax.management.ObjectName;
@@ -79,13 +79,13 @@ For other installation options, visit the [Downloads section](https://www.graalv
79
79
}
80
80
```
81
81
82
-
2.Ccompile the application using the GraalVMJDK:
82
+
2.Compile the application using the GraalVMJDK:
83
83
```shell
84
84
javac SimpleJmx.java
85
85
```
86
86
This creates _SimpleJmx.class_, _SimpleJmx$Simple.class_, and _SimpleJmx$SimpleMBean.class_ files.
87
87
88
-
3.Add dynamic proxy configuration. JMX uses dynamic proxies, a [dynamic feature](../DynamicFeatures.md) of Java, to access MBeans. To be able to interact with the custom `SimpleMBean` at run time, you need to provide NativeImage with additional [dynamic-proxy metadata](../ReachabilityMetadata.md#reflection) for the MBean interface. Forthis, create or modify a JSON file named _reachability-metadata.json_ with the following contents:
88
+
3.Add dynamic proxy configuration. JMX uses dynamic proxies, a [dynamic feature](../DynamicFeatures.md) of Java, to access MBeans. To be able to interact with the custom `SimpleMBean` at run time, you need to provide NativeImage with additional [dynamic-proxy metadata](../ReachabilityMetadata.md#reflection) for the MBean interface. Forthis, create the _META-INF/native-image_ directory in the current working directory (_jmx-test_).In the _META-INF/native-image_ directory create a _reachability-metadata.json_ file with the following contents:
89
89
```json
90
90
{
91
91
"reflection": [
@@ -98,9 +98,9 @@ For other installation options, visit the [Downloads section](https://www.graalv
98
98
}
99
99
```
100
100
101
-
4.Build a native executable with the VM inspection enabled and pass the JSON configuration file to `native-image`:
101
+
4.Build a native executable with the VM inspection enabled:
0 commit comments