|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
build.LoadletClassLoader
build.CompilingClassLoader
public class CompilingClassLoader
A ClassLoader that will recompile the *.java file corresponding to an out of date or missing *.class file. It also runs rmic to generate *_Stub.class and *_Skel.class files used by RMI.
A single CompilingClassLoader uses a sequence of pairs of directories:
javac -classpath app;jdk/lib/tools.jar -d app
app/build/CompilingClassLoader.java
java -Dbootstrap.path=app/classlib,app/src
-classpath app;jdk/lib/tools.jar
CompilingClassLoader app.Main
The -classpath must provide access to CompilingClassLoader and
tools.jar. It should not contain any directories for classes that
you want recompiled. Specify them in -Dbootstrap.path instead.
When getting a class by name, use CompilingClassLoader.forName() rather than Class.forName(). This will recompile such classes as necessary.
| Field Summary |
|---|
| Fields inherited from class build.LoadletClassLoader |
|---|
loadlet |
| Constructor Summary | |
|---|---|
CompilingClassLoader(java.lang.ClassLoader parent,
Loadlet loadlet)
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
Start your Java application through this main() as described above to get automatic compiling behavior. |
| Methods inherited from class build.LoadletClassLoader |
|---|
findClass, getLoadlet |
| Methods inherited from class java.lang.ClassLoader |
|---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompilingClassLoader(java.lang.ClassLoader parent,
Loadlet loadlet)
| Method Detail |
|---|
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||