---
title: "Java Remote Profiler"
author: "Rule"
date: "2017-04-04T15:00:22Z"
tags: []
categories: ["编程语言"]
slug: "java-remote-profiler"
draft: false
lastmod: "2017-04-05T09:51:09Z"
id: 2367281
url: "https://rule.iteye.com/blog/2367281"
---

grant codebase "file:${java.home}/../lib/tools.jar" {

    permission java.security.AllPermission;  

};

 

jstatd -J-Djava.security.policy=jstatd.all.policy

 

java -cp . \\

-Dcom.sun.management.jmxremote \\

-Djava.rmi.server.hostname=x.x.x.x \\

-Dcom.sun.management.jmxremote.port=9004 \\  

-Dcom.sun.management.jmxremote.authenticate=false \\  

-Dcom.sun.management.jmxremote.ssl=false \\

-jar test.jar