ç´°ãããã¿ã§ãã å®è¡ãã¦ãã JVM ã®ããã»ã¹IDãåãã«ã¯ RuntimeMXBean 使ãã¨ç°¡åã«åãã¾ãã RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean(); String vmName = bean.getName(); long pid = Long.valueOf(vmName.split("@")[0]); System.out.println("VM Name : " + vmName); System.out.println("PID : " + pid); å®è¡çµæã¯ãããªæã VM Name : 9588@hostname PID : 9588 RuntimeMXBean.getName() ã¯ãpid@hostname ã¨ããååãè¿ãã®ã§ãé ãæãåºãã°ããã»ã¹IDãåå¾ã§ãã¾ãã Sun ã®
{{#tags}}- {{label}}
{{/tags}}