public static Class<?> forName(String[] packages, String className) {
        try {
            return classForName(className);
        } catch (ClassNotFoundException e) {
            if (packages != null && packages.length > 0) {
                for (String pkg : packages) {
                    try {
                        return classForName(pkg + "." + className);
                    } catch (ClassNotFoundException ignore) {
                    }
                }
            }
            throw new IllegalStateException(e.getMessage(), e);
        }
    }
@Test
    void testForName2() {
        Assertions.assertEquals(boolean.class, ClassUtils.forName("boolean"));
        Assertions.assertEquals(byte.class, ClassUtils.forName("byte"));
        Assertions.assertEquals(char.class, ClassUtils.forName("char"));
        Assertions.assertEquals(short.class, ClassUtils.forName("short"));
        Assertions.assertEquals(int.class, ClassUtils.forName("int"));
        Assertions.assertEquals(long.class, ClassUtils.forName("long"));
        Assertions.assertEquals(float.class, ClassUtils.forName("float"));
        Assertions.assertEquals(double.class, ClassUtils.forName("double"));
        Assertions.assertEquals(boolean[].class, ClassUtils.forName("boolean[]"));
        Assertions.assertEquals(byte[].class, ClassUtils.forName("byte[]"));
        Assertions.assertEquals(char[].class, ClassUtils.forName("char[]"));
        Assertions.assertEquals(short[].class, ClassUtils.forName("short[]"));
        Assertions.assertEquals(int[].class, ClassUtils.forName("int[]"));
        Assertions.assertEquals(long[].class, ClassUtils.forName("long[]"));
        Assertions.assertEquals(float[].class, ClassUtils.forName("float[]"));
        Assertions.assertEquals(double[].class, ClassUtils.forName("double[]"));
    }