8173947: jconsole does not show local running VMs to attach
Reviewed-by: alanb, dholmes, dfuchs
This commit is contained in:
parent
779401fbbf
commit
eb16b1cd81
@ -949,23 +949,12 @@ public class JConsole extends JFrame
|
||||
}
|
||||
}
|
||||
|
||||
private static final boolean localAttachmentSupported;
|
||||
static {
|
||||
boolean supported;
|
||||
try {
|
||||
Class.forName("com.sun.tools.attach.VirtualMachine");
|
||||
Class.forName("sun.management.ConnectorAddressLink");
|
||||
supported = true;
|
||||
} catch (NoClassDefFoundError x) {
|
||||
supported = false;
|
||||
} catch (ClassNotFoundException x) {
|
||||
supported = false;
|
||||
}
|
||||
localAttachmentSupported = supported;
|
||||
}
|
||||
|
||||
/**
|
||||
* local attach is supported in this implementation as jdk.jconsole
|
||||
* requires jdk.attach and jdk.management.agent
|
||||
*/
|
||||
public static boolean isLocalAttachAvailable() {
|
||||
return localAttachmentSupported;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user