Skip to content

Instantly share code, notes, and snippets.

View dushmis's full-sized avatar
:octocat:
Focusing

Dushyant Mistry dushmis

:octocat:
Focusing
View GitHub Profile
@dushmis
dushmis / CustomerClassLoader_T.java
Last active December 21, 2015 09:29
Custome Class Loader
public class CustomeClassLoader_T{
static class CustomClassLoader extends ClassLoader {
String host;
int port;
public Class findClass(String name) {
byte[] b = loadClassData(name);
return b!=null?defineClass(name, b, 0, b.length):null;//or throw, return null for this example
}
private byte[] loadClassData(String name) {
// load the class data from the connection