public Class resolveClass(String className) {
        Class clazz;

        try {
            clazz = classLoader.loadClass(className);
            return clazz;
        } catch (ClassNotFoundException ex) {

            if (!className.contains(".") && Character.isUpperCase(className.charAt(0))) {
                System.out.println("Searching packages...");
                for (String searchPackage : searchPackages) {
                    try {
                        clazz = classLoader.loadClass(searchPackage + "." + className);
                        return clazz;
                    } catch (ClassNotFoundException ex1) {

                    }
                }
            }
        }

        return null;
    }