Hi All,
I am doing POC on JNI calling Native methods from servlet.The code I am posting here had worked fine for stand alone application,but when i work it out in
servlet its giving an
java.lang.UnsatisfiedLinkError:
Please find my code below
1.
I am making this as a jar file to call it from servlet for ease use
2.
and finally in my servlet class I am calling the jar file created above at using prog1.java
3.my servlet file(giving only the method used in servlet)
but after running the servlet I am getting an error
java.lang.UnsatisfiedLinkError: sum
at prog.prog1.sum(Native Method)
at prog.prog1.Sum(prog1.java:25)
at prog1.main(prog1.java:27)
I refered the forums they are saying like put the dll in java.library path
my library path is
C:\j2sdk1.4.2_04\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:\Oracle\product\10.1.0\
Client_2\bin;D:\Oracle\product\10.1.0\Client_2\jre\1.4.2\bin\client;D:\Oracle\
product\10.1.0\Client_2\jre\1.4.2\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\
System32\Wbem;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;
C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\
Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;
C:\j2sdk1.4.2_04\bin;C:\j2sdk1.4.2_04\bin\include;C:\j2sdk1.4.2_04\bin\include\win32;
C:\J2SDK1.4.2_04\BIN
where should i include my prog1.dll file
Please help me to resolve the problem ,no specific data though googled,
thank you in prior