This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [boehm-gc] Import 6.3 alpha 1
- From: rezaei at promail dot com
- To: java at gcc dot gnu dot org
- Cc: bryce at mckinlay dot net dot nz
- Date: Sat, 2 Aug 2003 13:14:32 -0400
- Subject: Re: [boehm-gc] Import 6.3 alpha 1
- Reply-to: rezaei at promail dot com
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