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/bash | |
# should also work with zsh | |
# (c) 2021 Riccardo Paolo Bestetti - bestov.io | |
# license: as long as you keep the above copyright notice and this license, you can do whatever you want with this | |
PORT='1099' | |
echo "Starting on port $PORT..." | |
jstatd -p $PORT -J-Djava.security.policy=<(echo 'grant codebase "jrt:/jdk.jstatd" { permission java.security.AllPermission; }; grant codebase "jrt:/jdk.internal.jvmstat" { permission java.security.AllPermission; };') |