System.load("path") problem

hi all,

I am facing a problem to load a library using System.load("abc.lib"). Its throws a unsatisfied link error. But, if i use the absolute path, then its successfully load the library.

Please help me, how can i load a libray using parameter in relative path..

Thank you

[297 byte] By [ismailsheikha] at [2007-11-27 11:30:05]
# 1

try to use "./abc.lib" it means abc.lin in current working directory. So make sure abc.lib is in your current directory.

JL.Nayaka at 2007-7-29 16:31:47 > top of Java-index,Java Essentials,Java Programming...
# 2

Try the library path flag:

-Djava.library.path=.

http://www.inonit.com/cygwin/jni/helloWorld/load.html

TuringPesta at 2007-7-29 16:31:47 > top of Java-index,Java Essentials,Java Programming...
# 3

abc.lib is my current working directory and i used System.load("./abc.lib") but it raised the same problem.

I browse the API that System.load() takes the absolute path not relative path.

I am using this in an applet.

Please help me, how can i resolve this problem.

Thank you

ismailsheikha at 2007-7-29 16:31:47 > top of Java-index,Java Essentials,Java Programming...
# 4

Try using the -D option as suggested, or rather than "./filename" try using System.getProperty("user.dir") + file.separator + "filename".

masijade.a at 2007-7-29 16:31:47 > top of Java-index,Java Essentials,Java Programming...