Class JDKBridge

java.lang.Object
com.sun.corba.ee.impl.util.JDKBridge

public class JDKBridge extends Object
Utility methods for doing various method calls which are used by multiple classes
  • Field Details

  • Constructor Details

    • JDKBridge

      public JDKBridge()
  • Method Details

    • getLocalCodebase

      public static String getLocalCodebase()
      Get local codebase System property (java.rmi.server.codebase). May be null or a space separated array of URLS.
      Returns:
      The value of the property
    • useCodebaseOnly

      public static boolean useCodebaseOnly()
      Return true if the system property "java.rmi.server.useCodebaseOnly" is set, false otherwise.
      Returns:
      If the property is set
    • loadClass

      public static Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException
      Returns a class instance for the specified class.
      Parameters:
      className - the name of the class
      remoteCodebase - a space-separated array of urls at which the class might be found. May be null.
      loader - a ClassLoader who may be used to load the class if all other methods fail.
      Returns:
      the Class object representing the loaded class.
      Throws:
      ClassNotFoundException - if class cannot be loaded.
    • loadClass

      public static Class loadClass(String className, String remoteCodebase) throws ClassNotFoundException
      Returns a class instance for the specified class.
      Parameters:
      className - the name of the class
      remoteCodebase - a space-separated array of urls at which the class might be found. May be null.
      Returns:
      the Class object representing the loaded class.
      Throws:
      ClassNotFoundException - if class cannot be loaded.
    • loadClass

      public static Class loadClass(String className) throws ClassNotFoundException
      Returns a class instance for the specified class.
      Parameters:
      className - the name of the class
      Returns:
      the Class object representing the loaded class.
      Throws:
      ClassNotFoundException - if class cannot be loaded.
    • setCodebaseProperties

      public static void setCodebaseProperties()
      Set the codebase and useCodebaseOnly properties. This is public only for test code.
    • setLocalCodebase

      public static void setLocalCodebase(String codebase)
      Set the default code base. This method is here only for test code.
      Parameters:
      codebase - The local codebase
    • loadClassM

      private static Class loadClassM(String className, String remoteCodebase, boolean useCodebaseOnly) throws ClassNotFoundException
      Throws:
      ClassNotFoundException