After much cursing and frustration, I discovered that onProcessCreation/Destruction must be called, and that only happens for windows platforms (see os_dep.cpp).
The solution is to use gcc's constructor/destructor attributes. This patch does that.
Also, this patch fixes the fact that the single-string constructor of JClassImpl doesn't initialize mClass to 0
patch to declare onProcessCreation and onProcessDestruction as constructors/destructors via attributes for gcc