Here you can find the source of loadClass(String name, ClassLoader loader)
Parameter | Description |
---|---|
loader | a parameter |
public static Class<?> loadClass(String name, ClassLoader loader)
//package com.java2s; //License from project: Open Source License public class Main { /**// w ww. j a v a 2 s . c o m * Load class or throw exception * @param loader */ public static Class<?> loadClass(String name, ClassLoader loader) { try { return loader.loadClass(name); } catch (ClassNotFoundException e) { fatal("Class " + name + " not found.", e); return null; } } /** Print fatal error and exit. */ public static <T> T fatal(String message, Exception e) { System.out.println(message); if (e != null && System.getProperty("stacktrace") != null) e.printStackTrace(); System.exit(0); return (T) null; } }