Installing Java 8 in CentOS.
sudo yum install java-1.8.0-openjdk
Verify: java -version
If you want tools like jstatd etc devel tools, you need to install
sudo yum install java-1.8.0-openjdk-devel
Verify: rpm -qa | grep java
For monitoring GC by jvisualvm
Create jstatd policy file by:
vi /tmp/jstatd.all.policy
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};
Start the process by, jstatd -J-Djava.security.policy=/tmp/jstatd.all.policy
**In above policy file, find java.home easily by
find / -name tools.jar
example output: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64/lib/tools.jar
Update the complete path from the above output
***
No comments:
Post a Comment