This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [boehm-gc] Import 6.3 alpha 1


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]