test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.java
author dfuchs
Thu, 28 Nov 2019 12:28:48 +0000
changeset 59305 219ec11136d9
parent 58313 8a2bc12d2a9a
permissions -rw-r--r--
8223196: java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java fails on Solaris SPARC Summary: The test is fixed to use InetAddress.getLocalHost consistently, instead of a mix of getLocalHost/wildcard addresses. Reviewed-by: chegar, vtewari
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
59305
219ec11136d9 8223196: java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java fails on Solaris SPARC
dfuchs
parents: 58313
diff changeset
     1
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
/*
58313
8a2bc12d2a9a 8231450: Copyright header line omitted from 8231187 changeset
michaelm
parents: 58295
diff changeset
     3
 * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * A Launcher to launch a java process with its standard input, output,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * and error streams connected to a socket.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
import java.io.IOException;
45578
cd8f28842351 8182465: Refactor shell test java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh to java
amlu
parents: 23041
diff changeset
    30
import java.net.InetAddress;
cd8f28842351 8182465: Refactor shell test java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh to java
amlu
parents: 23041
diff changeset
    31
import java.net.InetSocketAddress;
cd8f28842351 8182465: Refactor shell test java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh to java
amlu
parents: 23041
diff changeset
    32
import java.nio.channels.DatagramChannel;
cd8f28842351 8182465: Refactor shell test java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh to java
amlu
parents: 23041
diff changeset
    33
import java.nio.channels.ServerSocketChannel;
cd8f28842351 8182465: Refactor shell test java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh to java
amlu
parents: 23041
diff changeset
    34
import java.nio.channels.SocketChannel;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
public class Launcher {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
    static {
49128
97288886180c 8198834: (ch) Enable java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java on linux-x64
bpb
parents: 47216
diff changeset
    39
        System.loadLibrary("InheritedChannel");
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
    private static native void launch0(String cmdarray[], int fd) throws IOException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
    private static void launch(String className, String options[], String args[], int fd) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
        // java [-options] class [args...]
23041
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    46
        int optsLen = (options == null) ? 0 : options.length;
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    47
        int argsLen = (args == null) ? 0 : args.length;
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    48
        int len = 1 + optsLen + 1 + argsLen;
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
        String cmdarray[] = new String[len];
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
        int pos = 0;
23041
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    51
        cmdarray[pos++] = Util.javaCommand();
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    52
        if (options != null) {
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    53
            for (String opt: options) {
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    54
                cmdarray[pos++] = opt;
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    55
            }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
        cmdarray[pos++] = className;
23041
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    58
        if (args != null) {
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    59
            for (String arg: args) {
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    60
                cmdarray[pos++] = arg;
1aa7ce9cd0f1 8010194: java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh fails with "Timed out waiting ..." (sol)
alanb
parents: 23010
diff changeset
    61
            }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
        launch0(cmdarray, fd);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
52778
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    66
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    67
    /**
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    68
     * Launch 'java' with specified class using a UnixDomainSocket pair linking calling
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    69
     * process to the child VM. UnixDomainSocket is a simplified interface to PF_UNIX sockets
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    70
     * which supports byte a time reads and writes.
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    71
     */
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    72
    public static UnixDomainSocket launchWithUnixDomainSocket(String className) throws IOException {
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    73
        UnixDomainSocket[] socks = UnixDomainSocket.socketpair();
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    74
        launch(className, null, null, socks[0].fd());
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    75
        socks[0].close();
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    76
        return socks[1];
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    77
    }
dbbf46b13d52 8211842: IPv6_supported wrongly returns false when unix domain socket is bound to fd 0
michaelm
parents: 49128
diff changeset
    78
58295
7973073dd048 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
michaelm
parents: 52778
diff changeset
    79
    /**
7973073dd048 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
michaelm
parents: 52778
diff changeset
    80
     * Launch specified class with an AF_UNIX socket created externally, and one String arg to child VM
7973073dd048 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
michaelm
parents: 52778
diff changeset
    81
     */
7973073dd048 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
michaelm
parents: 52778
diff changeset
    82
    public static void launchWithUnixDomainSocket(String className, UnixDomainSocket socket, String arg) throws IOException {
7973073dd048 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
michaelm
parents: 52778
diff changeset
    83
        String[] args = new String[1];
7973073dd048 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
michaelm
parents: 52778
diff changeset
    84
        args[0] = arg;
7973073dd048 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
michaelm
parents: 52778
diff changeset
    85
        launch(className, null, args, socket.fd());
7973073dd048 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
michaelm
parents: 52778
diff changeset
    86
    }
7973073dd048 8231187: SelectorProvider.inheritedChannel() returns TCP socket channel for Unix domain socket
michaelm
parents: 52778
diff changeset
    87
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
     * Launch 'java' with specified class with the specified arguments (may be null).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
     * The launched process will inherit a connected TCP socket. The remote endpoint
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
     * will be the SocketChannel returned by this method.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
    public static SocketChannel launchWithSocketChannel(String className, String options[], String args[]) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
        ServerSocketChannel ssc = ServerSocketChannel.open();
59305
219ec11136d9 8223196: java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java fails on Solaris SPARC
dfuchs
parents: 58313
diff changeset
    95
        ssc.socket().bind(new InetSocketAddress(InetAddress.getLocalHost(), 0));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
        InetSocketAddress isa = new InetSocketAddress(InetAddress.getLocalHost(),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
                                                      ssc.socket().getLocalPort());
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
        SocketChannel sc1 = SocketChannel.open(isa);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
        SocketChannel sc2 = ssc.accept();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
        launch(className, options, args, Util.getFD(sc2));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
        sc2.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
        ssc.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
        return sc1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
    public static SocketChannel launchWithSocketChannel(String className, String args[]) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
        return launchWithSocketChannel(className, null, args);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
    public static SocketChannel launchWithSocketChannel(String className) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
        return launchWithSocketChannel(className, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
     * Launch 'java' with specified class with the specified arguments (may be null).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
     * The launched process will inherited a TCP listener socket.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
     * Once launched this method tries to connect to service. If a connection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
     * can be established a SocketChannel, connected to the service, is returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
    public static SocketChannel launchWithServerSocketChannel(String className, String options[], String args[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
        throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
    {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
        ServerSocketChannel ssc = ServerSocketChannel.open();
59305
219ec11136d9 8223196: java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java fails on Solaris SPARC
dfuchs
parents: 58313
diff changeset
   124
        ssc.socket().bind(new InetSocketAddress(InetAddress.getLocalHost(), 0));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
        int port = ssc.socket().getLocalPort();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
        launch(className, options, args, Util.getFD(ssc));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
        ssc.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
        InetSocketAddress isa = new InetSocketAddress(InetAddress.getLocalHost(), port);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
        return SocketChannel.open(isa);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
    public static SocketChannel launchWithServerSocketChannel(String className, String args[]) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
        return launchWithServerSocketChannel(className, null, args);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
    public static SocketChannel launchWithServerSocketChannel(String className) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
        return launchWithServerSocketChannel(className, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    /*
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
     * Launch 'java' with specified class with the specified arguments (may be null).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
     * The launch process will inherited a bound UDP socket.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
     * Once launched this method creates a DatagramChannel and "connects
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
     * it to the service. The created DatagramChannel is then returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
     * As it is connected any packets sent from the socket will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * sent to the service.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
    public static DatagramChannel launchWithDatagramChannel(String className, String options[], String args[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
        throws IOException
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    {
59305
219ec11136d9 8223196: java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java fails on Solaris SPARC
dfuchs
parents: 58313
diff changeset
   151
        InetAddress address = InetAddress.getLocalHost();
219ec11136d9 8223196: java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java fails on Solaris SPARC
dfuchs
parents: 58313
diff changeset
   152
        if (address.isLoopbackAddress()) {
219ec11136d9 8223196: java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java fails on Solaris SPARC
dfuchs
parents: 58313
diff changeset
   153
            address = InetAddress.getLoopbackAddress();
219ec11136d9 8223196: java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java fails on Solaris SPARC
dfuchs
parents: 58313
diff changeset
   154
        }
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
        DatagramChannel dc = DatagramChannel.open();
59305
219ec11136d9 8223196: java/nio/channels/spi/SelectorProvider/inheritedChannel/InheritedChannelTest.java fails on Solaris SPARC
dfuchs
parents: 58313
diff changeset
   156
        dc.socket().bind(new InetSocketAddress(address, 0));
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
        int port = dc.socket().getLocalPort();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
        launch(className, options, args, Util.getFD(dc));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
        dc.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
        dc = DatagramChannel.open();
16480
fcad3b6ec812 7183800: TEST_BUG: Update tests to run on Ubuntu 12.04 (localhost is 127.0.1.1)
alanb
parents: 5506
diff changeset
   163
        InetSocketAddress isa = new InetSocketAddress(address, port);
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
        dc.connect(isa);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
        return dc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
    public static DatagramChannel launchWithDatagramChannel(String className, String args[]) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
        return launchWithDatagramChannel(className, null, args);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    public static DatagramChannel launchWithDatagramChannel(String className) throws IOException {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
        return launchWithDatagramChannel(className, null);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
}