I've successfully build an openjdk 11 JDK for my target board (based on Gnueabi ARM). Then with JDK Jlink I successfully created a custom JRE which I was able to run on my target.
Now I'd like to remote debug with JStatd or JMX, but when I start java with
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8855
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
I got this error
-Dcom.sun.management is not supported in this VM.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
I already created a custom JRE with all the possible Java 11 modules with the command
sudo qemu-arm -L /usr/arm-linux-gnueabi jdk/bin/jlink --no-header-files --no-man-pages --module-path jmods --compress=2 --add-modules java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.se,java.security.jgss,java.security.sasl,java.smartcardio,java.sql,java.sql.rowset,java.transaction.xa,java.xml,java.xml.crypto,jdk.accessibility,jdk.attach,jdk.charsets,jdk.compiler,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.dynalink,jdk.editpad,jdk.hotspot.agent,jdk.httpserver,jdk.jartool,jdk.javadoc,jdk.jcmd,jdk.jconsole,jdk.jdeps,jdk.jdi,jdk.jdwp.agent,jdk.jfr,jdk.jlink,jdk.jshell,jdk.jsobject,jdk.jstatd,jdk.localedata,jdk.management,jdk.management.agent,jdk.management.jfr,jdk.naming.dns,jdk.naming.rmi,jdk.net,jdk.pack,jdk.rmic,jdk.scripting.nashorn,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.xml.dom,jdk.zipfs --output jre_all_modules
but I got the same "-Dcom.sun.management is not supported in this VM." error.
Since the target is an embedded board, with restricted amount of RAM, the goal is to got the minimun set of modules needed to run openjdk 11 JMX or JStatd.
Thanks to all in advance
UPDATE: I was building the jdk as "minimal". Configuring it, before make it, as "client" I resolved the problem.
I was building the jdk as "minimal". Configuring it, before make it, as "client" I resolved the problem