12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 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 /* @test 25 * @bug 4418673 26 * @summary verify that an inavlid setting of the system property 27 * java.rmi.server.RMIClassLoaderSpi causes an Error to be thrown to users 28 * of the RMIClassLoader API. 29 * @author Peter Jones 30 * 31 * @library ../../../testlibrary 32 * @build TestLibrary ServiceConfiguration 33 * @run main/othervm/policy=security.policy InvalidProperty 34 */ 35 36 import java.rmi.server.RMIClassLoader; 37 38 public class InvalidProperty { 39 40 public static void main(String[] args) throws Exception { 41 42 ServiceConfiguration.installServiceConfigurationFile(); 43 44 System.setProperty( 45 "java.rmi.server.RMIClassLoaderSpi", "NonexistentProvider"); 46 47 String classname = "Foo"; 48 49 TestLibrary.suggestSecurityManager(null); 50 51 try { | 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 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 /* @test 25 * @bug 4418673 26 * @summary verify that an inavlid setting of the system property 27 * java.rmi.server.RMIClassLoaderSpi causes an Error to be thrown to users 28 * of the RMIClassLoader API. 29 * @author Peter Jones 30 * 31 * @library ../../../testlibrary 32 * @modules java.rmi/sun.rmi.registry 33 * java.rmi/sun.rmi.server 34 * java.rmi/sun.rmi.transport 35 * java.rmi/sun.rmi.transport.tcp 36 * @build TestLibrary ServiceConfiguration 37 * @run main/othervm/policy=security.policy InvalidProperty 38 */ 39 40 import java.rmi.server.RMIClassLoader; 41 42 public class InvalidProperty { 43 44 public static void main(String[] args) throws Exception { 45 46 ServiceConfiguration.installServiceConfigurationFile(); 47 48 System.setProperty( 49 "java.rmi.server.RMIClassLoaderSpi", "NonexistentProvider"); 50 51 String classname = "Foo"; 52 53 TestLibrary.suggestSecurityManager(null); 54 55 try { |