Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 jdk.attach.jmod - Attach Module
JDK 17 jdk.attach.jmod is the JMOD file for JDK 17 Attach module.
JDK 17 Attach module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.attach.jmod.
JDK 17 Attach module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Attach module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.attach.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/tools/attach/HotSpotAttachProvider.java
/* * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package sun.tools.attach; import com.sun.tools.attach.VirtualMachineDescriptor; import com.sun.tools.attach.AttachPermission; import com.sun.tools.attach.AttachNotSupportedException; import com.sun.tools.attach.spi.AttachProvider; import java.util.List; import java.util.ArrayList; import java.util.Set; import sun.jvmstat.monitor.HostIdentifier; import sun.jvmstat.monitor.MonitoredHost; import sun.jvmstat.monitor.MonitoredVm; import sun.jvmstat.monitor.MonitoredVmUtil; import sun.jvmstat.monitor.VmIdentifier; /* * Platform specific provider implementations extend this */ public abstract class HotSpotAttachProvider extends AttachProvider { public HotSpotAttachProvider() { } public void checkAttachPermission() { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { sm.checkPermission( new AttachPermission("attachVirtualMachine") ); } } /* * This listVirtualMachines implementation is based on jvmstat. Can override * this in platform implementations when there is a more efficient mechanism * available. */ public List<VirtualMachineDescriptor> listVirtualMachines() { ArrayList<VirtualMachineDescriptor> result = new ArrayList<VirtualMachineDescriptor>(); MonitoredHost host; Set<Integer> vms; try { host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null)); vms = host.activeVms(); } catch (Throwable t) { if (t instanceof ExceptionInInitializerError) { t = t.getCause(); } if (t instanceof ThreadDeath) { throw (ThreadDeath)t; } if (t instanceof SecurityException) { return result; } throw new InternalError(t); // shouldn't happen } for (Integer vmid: vms) { String pid = vmid.toString(); String name = pid; // default to pid if name not available boolean isAttachable = false; MonitoredVm mvm = null; try { mvm = host.getMonitoredVm(new VmIdentifier(pid)); try { isAttachable = MonitoredVmUtil.isAttachable(mvm); // use the command line as the display name name = MonitoredVmUtil.commandLine(mvm); } catch (Exception e) { } if (isAttachable) { result.add(new HotSpotVirtualMachineDescriptor(this, pid, name)); } } catch (Throwable t) { if (t instanceof ThreadDeath) { throw (ThreadDeath)t; } } finally { if (mvm != null) { mvm.detach(); } } } return result; } /** * Test if a VM is attachable. If it's not attachable, * an AttachNotSupportedException will be thrown. For example, * 1.4.2 or 5.0 VM are not attachable. There are cases that * we can't determine if a VM is attachable or not and this method * will just return. * * This method uses the jvmstat counter to determine if a VM * is attachable. If the target VM does not have a jvmstat * share memory buffer, this method returns. * * @exception AttachNotSupportedException if it's not attachable */ void testAttachable(String id) throws AttachNotSupportedException { MonitoredVm mvm = null; try { VmIdentifier vmid = new VmIdentifier(id); MonitoredHost host = MonitoredHost.getMonitoredHost(vmid); mvm = host.getMonitoredVm(vmid); if (MonitoredVmUtil.isAttachable(mvm)) { // it's attachable; so return false return; } } catch (Throwable t) { if (t instanceof ThreadDeath) { ThreadDeath td = (ThreadDeath)t; throw td; } // we do not know what this id is return; } finally { if (mvm != null) { mvm.detach(); } } // we're sure it's not attachable; throw exception throw new AttachNotSupportedException( "The VM does not support the attach mechanism"); } /** * A virtual machine descriptor to describe a HotSpot virtual machine. */ static class HotSpotVirtualMachineDescriptor extends VirtualMachineDescriptor { HotSpotVirtualMachineDescriptor(AttachProvider provider, String id, String displayName) { super(provider, id, displayName); } public boolean isAttachable() { return true; } } }
⏎ sun/tools/attach/HotSpotAttachProvider.java
Or download all of them as a single archive file:
File name: jdk.attach-17.0.5-src.zip File size: 28319 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.charsets.jmod - Charsets Module
2023-07-01, 1071👍, 0💬
Popular Posts:
commons-collections4-4.4 -sources.jaris the source JAR file for Apache Commons Collections 4.2, whic...
SLF4J API is a simple API that allows to plug in any desired logging library at deployment time. Her...
How to download and install Apache XMLBeans-2.6.0.zip? If you want to try the XMLBeans Java library,...
What Is ojdbc7.jar for Oracle 12c R1? ojdbc7.jar for Oracle 12c R1 is the JAR files of ojdbc.jar, JD...
How to run "jarsigner" command from JDK tools.jar file? "jarsigner" command allows you to digitally ...