Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jvm-packages] Fixing the NativeLibLoader on Java 9+ #4351

Merged
merged 1 commit into from
Apr 10, 2019

Commits on Apr 9, 2019

  1. [jvm-packages] Fixing the NativeLibLoader on Java 9+

    The old NativeLibLoader had a short-circuit load path which modified
    java.library.path and attempted to load the xgboost library from outside
    the jar first, falling back to loading the library from inside the jar.
    This path is a no-op every time when using XGBoost outside of it's
    source tree. Additionally it triggers an illegal reflective access
    warning in the module system in 9, 10, and 11.
    
    On Java 12 the ClassLoader fields are not accessible via reflection
    (separately from the illegal reflective acces warning), and so it fails
    in a way that isn't caught by the code which falls back to loading the
    library from inside the jar.
    
    This commit removes that code path and always loads the xgboost library
    from inside the jar file as it's a valid technique across multiple JVM
    implementations and works with all versions of Java.
    Craigacp committed Apr 9, 2019
    Configuration menu
    Copy the full SHA
    64eaa4f View commit details
    Browse the repository at this point in the history