cannot start jstatd due to permission error

后端 未结 11 1137
野的像风
野的像风 2020-12-12 10:59

I try to run jstatd jvm monitoring tool on linux machine

jboss@hostAddr:/usr/java/jdk1.6.0_18/bin> uname -a
Linux hostAddr 2.6.16.60-0.34-smp #1 SMP Fri J         


        
11条回答
  •  难免孤独
    2020-12-12 11:35

    Just found following script to run jstatd. I managed to run jstatd with this script https://gist.github.com/nicerobot/1375032

    #!/bin/sh
    policy=${HOME}/.jstatd.all.policy
    [ -r ${policy} ] || cat >${policy} <<'POLICY'
    grant codebase "file:${java.home}/../lib/tools.jar" {
    permission java.security.AllPermission;
    };
    POLICY
    
    jstatd -J-Djava.security.policy=${policy} &
    

提交回复
热议问题