Hi,
how can i add my native libs to my netbeans project?
I added it to my library path
-Djava.library.path=".\lib\joal_native.dll"
in my VM Optiones, but it still cant find joal_native.
Hi
I rarely use Netbeans. You should add the option -Djava.library.path=".\lib", it has to point to the directory containing the natives. Which version of JOAL do you use? If the natives are in a JAR, rather use -classpath.
I use Eclipse, but I’m guessing you should just be able to drag the natives into some folder in your project for it to automatically be considered. Some NetBeans expert will need to give you specifics.
-Djava.library.path=".\lib" -> Still gives same error.
Im using 1.1.2.
I cant drag & drop the dll into the libary section, only in the src section but that does not solve it
Can i pack a dll into a jar and add it to my classpath?
Or can i modify my library path inside the java code?
Something like:
static{
System.addLibrary=".\lib\joal_native.dll";
}
Edit:
static {
try {
System.setProperty("java.library.path",System.getProperty("user.dir")+"\\lib");
System.out.println(System.getProperty("java.library.path"));
} catch (UnsatisfiedLinkError e) {
e.printStackTrace();
}
}
The dll is in the folder that he prints me, but he still says: not found
Solved, i use an other lib now: http://jerome.jouvie.free.fr/Fmod/NativeFmodEx/index.php
Thx u 2
You put a wrong path. Use an absolute path and it will work. If you use Djava.library.path=".\lib", it is relative to the current directory of the project. If you use System.setProperty(“java.library.path”,System.getProperty(“user.dir”)+"\lib"), you consider that the DLL is rather in your home directory. You seem to be confuse. Put the right path and it will work.
System.getProperty(“user.dir”)+"\lib" -> C:\Users\Blair\Documents\NetBeansProjects\trunk\Atramentum\lib
Thats the folder where my dll is
If i put the folder complete manualy, it still does not solve it
Anyway, that fmod seems to be better ( saw how many games using it ) and it works fine
thx