RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

Suchismith Roy sroy at openjdk.org
Thu Apr 11 17:18:47 UTC 2024


On Wed, 10 Apr 2024 16:46:30 GMT, Suchismith Roy <sroy at openjdk.org> wrote:

>> Allow support for both .a and .so files in AIX.
>> If .so file is not found, allow fallback to .a extension.
>> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516)
>
> Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Files copy method

`String libraryName = "awt";
        File awtSharedObjectPathCopy = new File("/test/lib/libawt.so");
        File awtSharedObjectPath = new File("/test/lib/libawt.so");
        File awtArchivePath = new File("/test/lib/libawt.a");
        awtSharedObjectPath.renameTo(awtArchivePath);
        if (awtSharedObjectPath.exists()) {
            awtSharedObjectPath.renameTo(awtSharedObjectPathCopy);
            throw new RuntimeException("LoadAIXLibraryFromArchiveObject: .so should not exist.");
            `
            
            @jaikiran  is this also right way to use the /test/lib directory ?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17945#issuecomment-2050149972


More information about the core-libs-dev mailing list