Last active
June 1, 2018 07:08
-
-
Save emacsist/18ab63779460286213b4705b35bf47dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
IFS_OLD="${IFS}" | |
IFS='' read -r -d '' String <<"EOF" | |
grant codebase "file:${java.home}/../lib/tools.jar" { | |
permission java.security.AllPermission; | |
}; | |
EOF | |
IFS=${IFS_OLD} | |
echo ${String} > /tmp/jstatd.all.policy | |
WAN_IP="`dig +short myip.opendns.com @resolver1.opendns.com`" | |
jstatd -J-Djava.security.policy=/tmp/jstatd.all.policy -J-Djava.rmi.server.hostname=${WAN_IP} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jstatd -J-Djava.security.policy=/tmp/jstatd.all.policy -J-Djava.rmi.server.hostname=YourIP