Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unsatisfiedlinkerror can't load library only when called as windows service

800604Aug 26 2009 — edited Aug 28 2009
Hi

I have a Java program that I converted to Windows exe with Launch4J. When I double click the exe, the program works with no problems.
The problem appears when I make this exe a Windows service. It starts, but it says :
java.lang.UnsatisfiedLinkError: Can't load library: [path]
The dll is a JNI wrapper. The [path] is correct. If I copy and paste it in windows explorer it takes me to the dll.
What I don't understand is why does it find the library when I double-click the exe but it doesn't find it when I start is as a service. Can anyone please shed some light on this?
Thank you!

Greetings
Alexandra.

P.S.: I'm running on Windows XP.
P.P.S.: I didn't write the native functions, I can't go though that code.


Alexandra N
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2009
Added on Aug 26 2009
18 comments
788 views