JDK7 System.loadLibrary on AIX

Matthias Baesken matthias.baesken at sap.com
Tue Sep 18 01:43:14 PDT 2012


Hello ,

I noticed that the IBM J9  is more flexible in the 
System.loadLibrary(libName) function;
in the OpenJDK JDK or SAPJVM we had a fix prefix and suffix for 
libraries to be loaded via
System.loadLibrary(libName).

E.g. for Linux the fix library name prefix was lib and the suffix .so , 
so for loading
libtesting.so  one would call

System.loadLibrary("testing");

However IBM J9 would (at least) support also loading *.a and full-name 
for the library
(maybe even more combinations ?) .
E.g.

libtesting.a
=>  System.loadLibrary("testing");    // works (at least with 6 and 7 )

libtesting.so
=>  System.loadLibrary("testing");    // works (at least with 6 and 7 )

as well  System.loadLibrary("libtesting.so");  // works also with full 
name(at least with 6 and 7)

Should we add this functionality also for OpenJDK ?

Fortunately with the MacOS-X port in jdk7 they added recently the 
functionality to
support more flexible naming for lib loading.
See in jdk7 :

solaris/classes/java/lang/ClassLoaderHelper.java

(still empty implementation)
or

macosx/classes/java/lang/ClassLoaderHelper.java
(where they support 2 extensions at the moment)


In the SAPJVM7 implementation I'll switch to use the 
solaris/classes/java/lang/ClassLoaderHelper.java
for this, might be an option also for OpenJDK AIX port .

What do you think ?


Thanks and best regards, Matthias

(btw. I am a colleague of Goetz and Volker working with them in the 
SAPJVM group)


More information about the ppc-aix-port-dev mailing list