< prev index next >

src/jdk.attach/windows/classes/sun/tools/attach/AttachProviderImpl.java

Print this page
rev 60629 : 8248656: Add Windows AArch64 platform support code
Reviewed-by:
Contributed-by: mbeckwit, luhenry, burban


  26 
  27 import com.sun.tools.attach.VirtualMachine;
  28 import com.sun.tools.attach.VirtualMachineDescriptor;
  29 import com.sun.tools.attach.AttachNotSupportedException;
  30 
  31 import java.util.ArrayList;
  32 import java.util.List;
  33 import java.io.IOException;
  34 import java.net.InetAddress;
  35 import java.net.UnknownHostException;
  36 
  37 public class AttachProviderImpl extends HotSpotAttachProvider {
  38 
  39     public AttachProviderImpl() {
  40         String os = System.getProperty("os.name");
  41         if (os.startsWith("Windows 9") || os.equals("Windows Me")) {
  42             throw new RuntimeException(
  43                 "This provider is not supported on this version of Windows");
  44         }
  45         String arch = System.getProperty("os.arch");
  46         if (!arch.equals("x86") && !arch.equals("amd64")) {
  47             throw new RuntimeException(
  48                 "This provider is not supported on this processor architecture");
  49         }
  50     }
  51 
  52     public String name() {
  53         return "sun";
  54     }
  55 
  56     public String type() {
  57         return "windows";
  58     }
  59 
  60     public VirtualMachine attachVirtualMachine(String vmid)
  61         throws AttachNotSupportedException, IOException
  62     {
  63         checkAttachPermission();
  64 
  65         // AttachNotSupportedException will be thrown if the target VM can be determined
  66         // to be not attachable.




  26 
  27 import com.sun.tools.attach.VirtualMachine;
  28 import com.sun.tools.attach.VirtualMachineDescriptor;
  29 import com.sun.tools.attach.AttachNotSupportedException;
  30 
  31 import java.util.ArrayList;
  32 import java.util.List;
  33 import java.io.IOException;
  34 import java.net.InetAddress;
  35 import java.net.UnknownHostException;
  36 
  37 public class AttachProviderImpl extends HotSpotAttachProvider {
  38 
  39     public AttachProviderImpl() {
  40         String os = System.getProperty("os.name");
  41         if (os.startsWith("Windows 9") || os.equals("Windows Me")) {
  42             throw new RuntimeException(
  43                 "This provider is not supported on this version of Windows");
  44         }
  45         String arch = System.getProperty("os.arch");
  46         if (!arch.equals("x86") && !arch.equals("amd64") && !arch.equals("aarch64")) {
  47             throw new RuntimeException(
  48                 "This provider is not supported on this processor architecture");
  49         }
  50     }
  51 
  52     public String name() {
  53         return "sun";
  54     }
  55 
  56     public String type() {
  57         return "windows";
  58     }
  59 
  60     public VirtualMachine attachVirtualMachine(String vmid)
  61         throws AttachNotSupportedException, IOException
  62     {
  63         checkAttachPermission();
  64 
  65         // AttachNotSupportedException will be thrown if the target VM can be determined
  66         // to be not attachable.


< prev index next >