# How to setup java.library.path with native dependencies?

**URL:** <https://discuss.gradle.org/t/how-to-setup-java-library-path-with-native-dependencies/2750>\
**Category:** Old Forum Archive\
**Created:** [December 12, 2013, 9:24pm UTC](https://discuss.gradle.org/t/how-to-setup-java-library-path-with-native-dependencies/2750 "2013-12-12T21:24:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Balint\_Krivan1](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/balint_krivan1/32/607_2.png) [@Balint\_Krivan1](https://discuss.gradle.org/u/Balint_Krivan1)\
**Post date:** [December 12, 2013, 9:24pm UTC](https://discuss.gradle.org/t/how-to-setup-java-library-path-with-native-dependencies/2750/1 "2013-12-12T21:24:00Z")

</div>

Hi!

I have a problem with java.library.path and native dependencies. I’m trying to setup a project with sqlite4java. It has the native libraries as maven dependency, so:

```gradle
dependencies {
  // ...
  runtime 'com.almworks.sqlite4java:sqlite4java-win32-x64:0.282'
}

```

works like a charm, I mean dll gets downloaded into /.gradle/caches/modules-2/files-2.1/…dll. My problem is how can I add these to java.library.path? I’m using this currently:

```gradle
run {
 systemProperty "java.library.path", 'native-libs'
}

```

which requires that I’ve put the native libs into version control under the directory ‘native-libs’. It would be nice if I wouldn’t need it and the dependencies could be added. Anyone has encountered a situation like this and maybe has a solution?

Thanks!
