RFR: 8350041: Make libstringPlatformChars support static JDK

Jiangli Zhou jiangli at openjdk.org
Fri Feb 14 18:37:58 UTC 2025


Please review the fix to make `java/lang/String/nativeEncoding/StringPlatformChars.java` jtreg test: 

- Lookup `JNU_GetStringPlatformChars`, `JNU_ClassString` and `JNU_NewStringPlatform` dynamically
- Remove `#include "jni_util.h"` and don't link `libstringPlatformChars.so` with `libjava.so`
- Link with `-ldl` explicitly

The test passed on Linux, macos and Windows in GHA testing, https://github.com/jianglizhou/jdk/actions/runs/13320840902/job/37206171224

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

Commit messages:
 - Remove 'lib' prefix from 'java.dll'.
 - Update copyright header year.
 - - Change to call JNU_GetStringPlatformChars, JNU_ClassString and JNU_NewStringPlatform

Changes: https://git.openjdk.org/jdk/pull/23646/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23646&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8350041
  Stats: 61 lines in 2 files changed: 55 ins; 1 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/23646.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23646/head:pull/23646

PR: https://git.openjdk.org/jdk/pull/23646


More information about the build-dev mailing list