Created
          August 8, 2017 06:24 
        
      - 
      
 - 
        
Save gonejack/8076b09b92cb2e639a14306d5e942bac to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class MainClass { | |
| public static void main(String[] args){ | |
| ClassLoader classLoader = MainClass.class.getClassLoader(); | |
| try { | |
| Class aClass = classLoader.loadClass("com.jenkov.MyClass"); | |
| System.out.println("aClass.getName() = " + aClass.getName()); | |
| } catch (ClassNotFoundException e) { | |
| e.printStackTrace(); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment