< prev index next >

test/com/sun/jdi/SunBootClassPathEmptyTest.java

Print this page




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import com.sun.jdi.connect.*;
  25 import com.sun.jdi.*;
  26 import java.util.Map;
  27 import java.util.List;
  28 import jdk.test.lib.Asserts;
  29 
  30 /*
  31  * @test
  32  * @summary Verifies that PathSearchingVirtualMachine.bootClassPath()
  33  *          returns an empty list in case no bootclass path specified
  34  *          regardless of sun.boot.class.path option, which is now obsolete
  35  * @library /test/lib/share/classes
  36  * @compile TestClass.java
  37  * @compile SunBootClassPathEmptyTest.java
  38  * @run main/othervm SunBootClassPathEmptyTest
  39  */
  40 public class SunBootClassPathEmptyTest {
  41 
  42     /**
  43      * Helper class to facilitate the debuggee VM launching
  44      */
  45     private static class VmConnector {
  46 
  47         LaunchingConnector lc;
  48         VirtualMachine vm;
  49 
  50         VmConnector() {
  51             for (LaunchingConnector c : Bootstrap.virtualMachineManager().launchingConnectors()) {
  52                 System.out.println("name: " + c.name());
  53                 if (c.name().equals("com.sun.jdi.CommandLineLaunch")) {
  54                     lc = c;
  55                     break;




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import com.sun.jdi.connect.*;
  25 import com.sun.jdi.*;
  26 import java.util.Map;
  27 import java.util.List;
  28 import jdk.test.lib.Asserts;
  29 
  30 /*
  31  * @test
  32  * @summary Verifies that PathSearchingVirtualMachine.bootClassPath()
  33  *          returns an empty list in case no bootclass path specified
  34  *          regardless of sun.boot.class.path option, which is now obsolete
  35  * @library /test/lib
  36  * @compile TestClass.java
  37  * @compile SunBootClassPathEmptyTest.java
  38  * @run main/othervm SunBootClassPathEmptyTest
  39  */
  40 public class SunBootClassPathEmptyTest {
  41 
  42     /**
  43      * Helper class to facilitate the debuggee VM launching
  44      */
  45     private static class VmConnector {
  46 
  47         LaunchingConnector lc;
  48         VirtualMachine vm;
  49 
  50         VmConnector() {
  51             for (LaunchingConnector c : Bootstrap.virtualMachineManager().launchingConnectors()) {
  52                 System.out.println("name: " + c.name());
  53                 if (c.name().equals("com.sun.jdi.CommandLineLaunch")) {
  54                     lc = c;
  55                     break;


< prev index next >