Java and Memory Protections
Posted Dec 3, 2006 12:54 UTC (Sun) by fjalvingh
In reply to: Java and Memory Protections
Parent article: Virtual Machines and Memory Protections
You are both right. A ClassLoader is used to create the class. But the classloader used for Applets (which is a a standard one) indeed merely loads a stream of bytes and instantiates these as a Class using a ClassLoader base method [ Class defineClass(String name, byte b, int off, int len)].
In Java it is trivial to write and execute your own byte code from within a program; whole libraries exist to help you doing it (BCEL, ASM). I used this extensively in many programs to speed up scripting stuff or parameterized logic by compiling it into a class (which will then be JITted by the Java runtime).
Anyway, the fact that Java code can do that has nothing to do with the article's subject which has to do with actual executable content for a system processor...
to post comments)