< prev index next >

test/java/rmi/server/RMIClassLoader/spi/Installed.java

Print this page




  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 with the java.rmi.server.RMIClassLoaderSpi system
  27  * property not set, the first provider located through java.util.ServiceLoader
  28  * (which should be "TestProvider2") will be used by the RMIClassLoader API.
  29  * @author Peter Jones
  30  *
  31  * @library ../../../testlibrary




  32  * @build TestLibrary ServiceConfiguration TestProvider TestProvider2
  33  * @run main/othervm/policy=security.policy Installed
  34  */
  35 
  36 public class Installed {
  37     public static void main(String[] args) throws Exception {
  38 
  39         ServiceConfiguration.installServiceConfigurationFile();
  40 
  41         TestProvider.exerciseTestProvider(
  42             TestProvider2.loadClassReturn,
  43             TestProvider2.loadProxyClassReturn,
  44             TestProvider2.getClassLoaderReturn,
  45             TestProvider2.getClassAnnotationReturn,
  46             TestProvider2.invocations);
  47     }
  48 }


  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 with the java.rmi.server.RMIClassLoaderSpi system
  27  * property not set, the first provider located through java.util.ServiceLoader
  28  * (which should be "TestProvider2") will be used by 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 TestProvider TestProvider2
  37  * @run main/othervm/policy=security.policy Installed
  38  */
  39 
  40 public class Installed {
  41     public static void main(String[] args) throws Exception {
  42 
  43         ServiceConfiguration.installServiceConfigurationFile();
  44 
  45         TestProvider.exerciseTestProvider(
  46             TestProvider2.loadClassReturn,
  47             TestProvider2.loadProxyClassReturn,
  48             TestProvider2.getClassLoaderReturn,
  49             TestProvider2.getClassAnnotationReturn,
  50             TestProvider2.invocations);
  51     }
  52 }
< prev index next >