JDK7 System.loadLibrary on AIX

Matthias Baesken matthias.baesken at sap.com
Tue Sep 18 08:16:59 PDT 2012


Hello Steve , Thanks for your  quick reply  -  in the SAP JVM 7  I  
currently  do not have a separate

aix/classes/java/lang/ClassLoaderHelper.java

to  support  the flexible  extensions , but do  everything  in

solaris/classes/java/lang/ClassLoaderHelper.java

( which is used for  Linux/Solaris/AIX/HPUX in SAPJVM7  - I simply  have 
some if / else there to distinguish AIX and the "rest" ).

In case that we have more candidates for aix -specific files than just 
one,  we could  indeed  have it  at

aix/classes ...

--> what do the others think ?

Also , should we support more than *.a / *.so + full-name  (the cases we 
did )  on AIX  ?

Best regards, Matthias


Am 18.09.2012 13:15, schrieb Steve Poole:
> hi Matthias -  I think adding that sort of support to OpenJDK makes sense.   We should not artificially restrict the form that a library name takes. If AIX can load it we should support it :-)
>
> It also sounds like we need our own version of  solaris/classes/java/lang/ClassLoaderHelper.java
> Is that aix/classes/java/lang/ClassLoaderHelper.java ?  :-)
>
>
> On 18 Sep 2012, at 09:43, Matthias Baesken <matthias.baesken at sap.com> wrote:
>
>> 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