tags:

views:

18

answers:

1

This is probably trivial - I almost feel embarrassed to ask, but I am new to this.

So I downloaded a library that uses JNI and I need to store the .dll library in my PATH. What is my PATH and where can I find it?

+2  A: 

I assume you are talking about Windows. To set system wide PATH you should right click on "My computer" go to Advanced, click "Environment Variables" and there you should find the PATH variable, which you can modify (in System variables).

Edit: for Linux loading a .so (dynamic link library for linux) is done using LD_LIBRARY_PATH environment variable which has to contain the directory of the .so.

So you can have a script running your program that does (just an example):

#!/bin/bash
export LD_LIBRARY_PATH=/install_directory
java -jar /install_directory/myjar.jar 
vladmihaisima
This particular library is for Windows, but I also have a dll that needs to be used for linux. I need to be able to distribute this dll along with my project as well.
whydna
Ok, but does it work now ? (for windows at least). I have edited the answer for Linux also.
vladmihaisima