JNI Invocation: static UN-initializers?
From: James Robert Leek (jrleek_at_soda.csua.berkeley.edu)
Date: 08/31/04
- Next message: marcus: "Re: chating in java applet"
- Previous message: Razvan: "Thread synchronization"
- Next in thread: A. Bolmarcich: "Re: JNI Invocation: static UN-initializers?"
- Reply: A. Bolmarcich: "Re: JNI Invocation: static UN-initializers?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 31 Aug 2004 16:21:39 +0000 (UTC)
I'm writing language interoperability tools for scientific computing. It
supports C, C++, Fortran, Python, and Java through the JNI. Anyway, my
boss would like to add static uninitializers. A static unitializer is the
opposite of a static initializer. Insted of being a static function that
is run when a class is statically loaded, a static uninitializer is run
once when the class is staticly unloaded. In general this means when the
JVM is unloaded, it should run some code for each class that has been
loaded.
So here's the question:
Is this even freakin' possible in Java? There are 2 ways I can think of
where it might work:
If the feature already exists in Java (As it does with C, and fortran)
such that when I call DestroyJavaVM, Java calls code. However, I
understand that DestroyJavaVM doesn't even work, so that might be a no go.
Another possibility would be if there is some way to have Java find all
the classes currently loaded and call some function on them, is that
possible?
Thanks,
-- Jim Leek jrleek@soda.berkeley.edu
- Next message: marcus: "Re: chating in java applet"
- Previous message: Razvan: "Thread synchronization"
- Next in thread: A. Bolmarcich: "Re: JNI Invocation: static UN-initializers?"
- Reply: A. Bolmarcich: "Re: JNI Invocation: static UN-initializers?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|