Recent Posts
JavaScript | 17 sec ago
OpenGL Shading | 21 sec ago
PHP | 26 sec ago
None | 48 sec ago
None | 53 sec ago
Haskell | 55 sec ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
Lisp | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By Anonymous on the 9th of Feb 2010 09:52:19 PM
Download |
Raw |
Embed |
Report
package com.pie.jotta.util;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
/*
* This file is part of Jotta.
*
* Jotta is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Jotta is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Jotta. If not, see <http://www.gnu.org/licenses/>.
*/
super(parent);
}
if(!name.contains("com.pie.jotta.util.command"))
return super.loadClass(name);
try {
String[] nameSplit
= name.
split("[\\.]");
name = name.split("[\\.]")[nameSplit.length-1];
+ "/bin/com/pie/jotta/util/command/"
+ (name.endsWith(".class") ? name : name + ".class");
int data = input.read();
while(data != -1){
buffer.write(data);
data = input.read();
}
input.close();
byte[] classData = buffer.toByteArray();
return defineClass("com.pie.jotta.util.command."+name,
classData, 0, classData.length);
System.
err.
println(e.
getMessage());
}
return null;
}
}
Submit a correction or amendment below.
Make A New Post