throw new UnknownClassException(msg);
/** * Attempts to load the specified class name from the current thread's * {@link Thread#getContextClassLoader() context class loader}, then the * current ClassLoader (<code>Classes.class.getClassLoader()</code>), then the system/application * ClassLoader (<code>ClassLoader.getSystemClassLoader()</code>, in that order. If any of them cannot locate * the specified class, an <code>UnknownClassException</code> is thrown (our RuntimeException equivalent of * the JRE's <code>ClassNotFoundException</code>. * * @param fqcn the fully qualified class name to load * @return the located class * @throws UnknownClassException if the class cannot be found. */ public static Class forName(String fqcn) throws UnknownClassException { Class clazz = THREAD_CL_ACCESSOR.loadClass(fqcn); if (clazz == null) { clazz = CLASS_CL_ACCESSOR.loadClass(fqcn); } if (clazz == null) { clazz = SYSTEM_CL_ACCESSOR.loadClass(fqcn); } if (clazz == null) { String msg = "Unable to load class named [" + fqcn + "] from the thread context, current, or " + "system/application ClassLoaders. All heuristics have been exhausted. Class could not be found."; if (fqcn != null && fqcn.startsWith("com.stormpath.sdk.impl")) { msg += " Have you remembered to include the stormpath-sdk-impl .jar in your runtime classpath?"; } throw new UnknownClassException(msg); } return clazz; }
throw new UnknownClassException(msg);