Mikhail, You certainly can. Just add System.loadLibrary(<component name>) to the static initialization block of a class, which declares that method and call <clinit> for such class.
Example. ---------------------- Component: gcv5.dll Class, implementing fast path magics: GCv5Magics Class source: class GCv5Magics { static { System.loadLibrary("gcv5.dll"); } // ... the rest of magics for GC v5 } Regards, Pavel. P.S. <clinit> is not called for such classes now, but magics are all something new to add to VM. On 10/20/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote:
All, AFAIK today I can't add JNI method to a component (em library, gc library, jit library) and call the method from Java. Is there any reason why do we have this limitation? I have only the one, but IMO very serious reason why to allow it: a part of a component could be written in Java. The example is EMThreadSupport.java class. This class is a part of the kernel classes but this is wrong. I can't extend its functionality without modification of VM-EM native interface. ? -- Mikhail Fursov