Skip to content

Commit f73ca7c

Browse files
committed
Refactor Native Image JMX demo
1 parent 1c0aa01 commit f73ca7c

File tree

13 files changed

+22
-104
lines changed

13 files changed

+22
-104
lines changed

.github/workflows/native-image-add-jfr-support.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515
contents: read
1616
jobs:
1717
run:
18-
name: Run 'native-jfr-demo'
18+
name: Run 'native-image/add-jfr-support'
1919
runs-on: ubuntu-latest
2020
timeout-minutes: 15
2121
strategy:
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
name: native-image-jmx-demo
1+
name: native-image/add-jmx-support
22
on:
33
push:
44
paths:
5-
- 'native-image-jmx-demo/**'
6-
- '.github/workflows/native-image-jmx-demo.yml'
5+
- 'native-image/add-jmx-support/**'
6+
- '.github/workflows/native-image-add-jmx-support.yml'
77
pull_request:
88
paths:
9-
- 'native-image-jmx-demo/**'
10-
- '.github/workflows/native-image-jmx-demo.yml'
9+
- 'native-image/add-jmx-support/**'
10+
- '.github/workflows/native-image-add-jmx-support.yml'
1111
schedule:
1212
- cron: "0 0 1 * *" # run every month
1313
workflow_dispatch:
1414
permissions:
1515
contents: read
1616
jobs:
1717
run:
18-
name: Run 'native-image-jmx-demo'
18+
name: Run 'native-image/add-jmx-support'
1919
runs-on: ubuntu-latest
2020
timeout-minutes: 15
2121
strategy:
2222
matrix:
23-
java-version: ['21', 'dev']
23+
java-version: ['21', '24-ea']
2424
steps:
2525
- uses: actions/checkout@v4
2626
- uses: graalvm/setup-graalvm@v1
@@ -31,10 +31,10 @@ jobs:
3131
native-image-job-reports: 'true'
3232
- name: Run 'native-image-jmx-demo'
3333
run: |
34-
cd native-image-jmx-demo
34+
cd native-image/add-jmx-support
3535
wget -q https://github.com/jiaqi/jmxterm/releases/download/v1.0.2/jmxterm-1.0.2-uber.jar
3636
javac SimpleJmx.java
37-
native-image --enable-monitoring=jmxserver,jmxclient,jvmstat -H:DynamicProxyConfigurationFiles=proxy-config.json SimpleJmx
37+
native-image -Ob --enable-monitoring=jmxserver,jmxclient,jvmstat -H:DynamicProxyConfigurationFiles=proxy-config.json SimpleJmx
3838
./simplejmx -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=9996 -Dcom.sun.management.jmxremote.ssl=false &
3939
sleep 1
40-
echo "get --bean com.jmx.test.basic:name=simple *" | java -jar jmxterm-1.0.2-uber.jar --noninteract --url localhost:9996
40+
echo "get --bean com.jmx.test.basic:name=simple *" | java -jar jmxterm-1.0.2-uber.jar --noninteract --url localhost:9996

native-image-jmx-demo/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

native-image-jmx-demo/README.md

Lines changed: 0 additions & 91 deletions
This file was deleted.
-63.8 KB
Binary file not shown.
-137 KB
Binary file not shown.
-75.8 KB
Binary file not shown.

native-image/add-jfr-support/run.sh

100644100755
File mode changed.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.class
2+
simplejmx
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Build and Run Native Executables with Remote JMX
2+
3+
You can find the steps to run this demo on [the website](https://www.graalvm.org/latest/reference-manual/native-image/guides/build-and-run-native-executable-with-remote-jmx/).

0 commit comments

Comments
 (0)