test/sun/rmi/rmic/classpath/RMICClassPathTest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 35,50 ****
import java.io.File;
import sun.rmi.rmic.BatchEnvironment;
public class RMICClassPathTest {
public static void main(String[] args) throws Exception {
! String sysPath = "/home/~user/jdk/jre/lib/rt.jar";
String extDir = "";
! String clPath = "/home/~user/user.jar" + File.pathSeparator +
! "/home/~user/user2.jar" + File.pathSeparator +
! "/home/~user/user3.jar";
String cpStr = BatchEnvironment.createClassPath(clPath, sysPath, extDir).toString();
String[] paths = cpStr.split(File.pathSeparator);
--- 35,51 ----
import java.io.File;
import sun.rmi.rmic.BatchEnvironment;
public class RMICClassPathTest {
+ private final static String SRC_PATH = System.getProperty("test.src", ".");
public static void main(String[] args) throws Exception {
! String sysPath = SRC_PATH + "/jdk/jre/lib/rt.jar";
String extDir = "";
! String clPath = SRC_PATH + "/user.jar" + File.pathSeparator +
! SRC_PATH + "/user2.jar" + File.pathSeparator +
! SRC_PATH + "/user3.jar";
String cpStr = BatchEnvironment.createClassPath(clPath, sysPath, extDir).toString();
String[] paths = cpStr.split(File.pathSeparator);