< prev index next >

src/jdk.jdi/share/classes/com/sun/tools/jdi/RawCommandLineLauncher.java

Print this page




  36 
  37     static private final String ARG_COMMAND = "command";
  38     static private final String ARG_ADDRESS = "address";
  39     static private final String ARG_QUOTE   = "quote";
  40 
  41     TransportService transportService;
  42     Transport transport;
  43 
  44     public TransportService transportService() {
  45         return transportService;
  46     }
  47 
  48     public Transport transport() {
  49         return transport;
  50     }
  51 
  52     public RawCommandLineLauncher() {
  53         super();
  54 
  55         try {
  56             Class<?> c = Class.forName("com.sun.tools.jdi.SharedMemoryTransportService");
  57             transportService = (TransportService)c.newInstance();


  58             transport = new Transport() {
  59                 public String name() {
  60                     return "dt_shmem";
  61                 }
  62             };
  63         } catch (ClassNotFoundException x) {
  64         } catch (UnsatisfiedLinkError x) {
  65         } catch (InstantiationException x) {
  66         } catch (IllegalAccessException x) {
  67         };
  68 
  69         if (transportService == null) {
  70             transportService = new SocketTransportService();
  71             transport = new Transport() {
  72                 public String name() {
  73                     return "dt_socket";
  74                 }
  75             };
  76         }
  77 
  78         addStringArgument(
  79                 ARG_COMMAND,
  80                 getString("raw.command.label"),
  81                 getString("raw.command"),
  82                 "",
  83                 true);
  84         addStringArgument(
  85                 ARG_QUOTE,
  86                 getString("raw.quote.label"),




  36 
  37     static private final String ARG_COMMAND = "command";
  38     static private final String ARG_ADDRESS = "address";
  39     static private final String ARG_QUOTE   = "quote";
  40 
  41     TransportService transportService;
  42     Transport transport;
  43 
  44     public TransportService transportService() {
  45         return transportService;
  46     }
  47 
  48     public Transport transport() {
  49         return transport;
  50     }
  51 
  52     public RawCommandLineLauncher() {
  53         super();
  54 
  55         try {
  56             @SuppressWarnings("deprecation")
  57             Object o =
  58                 Class.forName("com.sun.tools.jdi.SharedMemoryTransportService").newInstance();
  59             transportService = (TransportService)o;
  60             transport = new Transport() {
  61                 public String name() {
  62                     return "dt_shmem";
  63                 }
  64             };
  65         } catch (ClassNotFoundException |
  66                  UnsatisfiedLinkError |
  67                  InstantiationException |
  68                  IllegalAccessException x) {
  69         };
  70 
  71         if (transportService == null) {
  72             transportService = new SocketTransportService();
  73             transport = new Transport() {
  74                 public String name() {
  75                     return "dt_socket";
  76                 }
  77             };
  78         }
  79 
  80         addStringArgument(
  81                 ARG_COMMAND,
  82                 getString("raw.command.label"),
  83                 getString("raw.command"),
  84                 "",
  85                 true);
  86         addStringArgument(
  87                 ARG_QUOTE,
  88                 getString("raw.quote.label"),


< prev index next >