-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
incompatible-changeIncompatible/breaking changeIncompatible/breaking changeteam-Rules-JavaIssues for Java rulesIssues for Java rules
Description
Changed in: Bazel 5.0.0
The directories of native libraries (cc_binary, cc_library) in the data attribute of Java targets (java_library, java_test, java_binary, java_import) are not collected and added as -Djava.library.path attribute to the JVM. This may cause System.load call to fail finding such a library.
Migration
Solution is to move dependency to such a library from the data to runtime_deps (or to deps in case of java_import). Alternative is to replace System.load call with System.loadLibrary, which can be given path to the library.
Metadata
Metadata
Assignees
Labels
incompatible-changeIncompatible/breaking changeIncompatible/breaking changeteam-Rules-JavaIssues for Java rulesIssues for Java rules