1.启动参数
java -jar \
-Djava.rmi.server.hostname=192.168.14.11 \
-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=2622 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.access.file=/usr/jmxremote.access \
-Dcom.sun.management.jmxremote.password.file=/usr/jmxremote.password \
user.jar
-Djava.rmi.server.hostname 远程服务的地址
需要设置文件权限
chmod 0400 jmxremote.password
2.visual gc提示not supported for this jvm
在自己的jdk里 vim jdk/jre/lib/security/java.policy 加入permission java.security.AllPermission;
如下:
grant {
// Allows any thread to stop itself using the java.lang.Thread.stop()
// method that takes no argument.
// Note that this permission is granted by default only to remain
// backwards compatible.
// It is strongly recommended that you either