简体   繁体   中英

Java NetBeans - storing my .DLL in PATH - where is it?

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?

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 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM