Libraryless. Click here for Pure Java version (1624L/11K).
import javax.management.MBeanServer; import java.lang.management.ManagementFactory; import javax.management.ObjectName; import javax.management.JMX; static virtual OpenJ9DiagnosticsMXBean openJ9_diagnosticsBean() ctex { Class beanClass = classForNameOpt("openj9.lang.management.OpenJ9DiagnosticsMXBean"); if (beanClass == null) null; // Not on OpenJ9 ObjectName mxbeanName = new("openj9.lang.management:type=OpenJ9Diagnostics"); MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer(); if (!mbeanServer.isRegistered(mxbeanName)) null; ret JMX.newMXBeanProxy(mbeanServer, mxbeanName, beanClass); }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1024217 |
Snippet name: | openJ9_diagnosticsBean |
Eternal ID of this version: | #1024217/4 |
Text MD5: | 70696b4097c336b60fa29918a3166f79 |
Transpilation MD5: | c06be18e6d23fa5011fa30fc4a75aded |
Author: | stefan |
Category: | javax / management |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-26 15:57:56 |
Source code size: | 634 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 212 / 308 |
Version history: | 3 change(s) |
Referenced in: | [show references] |