Created
April 13, 2020 15:50
-
-
Save nipunthathsara/5cd7f768011404d219fd2d317c9e5a58 to your computer and use it in GitHub Desktop.
Class loading example
This file contains 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
package org.example; | |
import java.util.ArrayList; | |
import com.sun.crypto.provider.AESKeyGenerator; | |
public class Foo { | |
public static void main(String[] args) { | |
System.out.println("Hello World!"); | |
System.out.println("java.ext.dirs : " + System.getProperty("java.ext.dirs")); | |
System.out.println("com.sun.crypto.provider.AESKeyGenerator : " + AESKeyGenerator.class.getClassLoader()); | |
System.out.println("Foo : " + Foo.class.getClassLoader()); | |
System.out.println("String array : " + String[].class.getClassLoader()); | |
System.out.println("ArrayList : " + ArrayList.class.getClassLoader()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment