[boehm-gc] Import 6.3 alpha 1

rezaei@promail.com rezaei@promail.com
Sat Aug 2 17:16:00 GMT 2003


Bryce McKinlay wrote:

> void loadFakeDriver()
> {
> dynamically_create_bytecode_for_FakeDriver_and_put_it_into_the_classpath ();
> FakeDriver.run();
> }

The concept in the above code is vital to any program that requires run time 
compilation. Important examples include JSP servers and language 
interpreters. However, there are two ways of achieving the same result:
1) Using a custom class loader. This is the approach taken most often today. 
Writing class loaders can be hell though.
2) Simply sticking a .class in the classpath and letting the default class 
loader deal with it.

> But this code will have unspecified results according to the JLS, it isn't valid java source without a FakeDriver.class present, and it could be
> made to work perfectly well using Class.forName().

Which approach violates the JLS? Which approach would work with gcj?

Thanks
Moh



More information about the Java mailing list