JNI java.lang.UnsatisfiedLinkError with found DLL



Hi

I have made a C++ DLL, which I load like this:
static {
System.loadLibrary("LicenseWrapper");
}

I have added the location of the DLL to the windows PATH.

On windows XP this works fine and I get expected results.
On windows 2003 I get :

Exception in thread "main" java.lang.UnsatisfiedLinkError:
C:\license\LicenseWrapper.dll: This application has failed to start
because the application configuration is incorrect. Reinstalling the
application may fix this problem
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1843)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1729)
at java.lang.Runtime.loadLibrary0(Runtime.java:780)
at java.lang.System.loadLibrary(System.java:865)

This error is not because it cannot find the DLL, which I have verified
by renaming it, there is something else.

The DLL is created in a Win32 Project using Microsoft Visual Studio
2005.

Are there windows version considurations when creating a DLL for JNI?

Best regards,
Jörgen

.



Relevant Pages

  • Re: BadImageFormatException was unhandled
    ... I have a solution with many projects and a substantial reference tree. ... I have a Windows Application project that will build but not run. ... An attempt was made to load ... Otherwise, the 64 bit main exe cannot load any 32bit DLL, include the DLL which uses managed C++ and it calls the win API, or other natvie C 32bit DLL. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: .Net packaging/wrapper application?
    ... it just didn't work well in reality due to DLL ... Windows works is to look in the executable's directory for a needed DLL ... the way apps used to work when they developed Windows. ... Looks to me like Jim is looking for the .NET equivalent of compiling ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Unnown process... 5eplorer.exe
    ... do not remove the cause (a "super"-hidden .dll program) but only remove ... symptom files and registry settings. ... It has all permissions but 'copy' denied to everyone, ... then by using the Windows XP Recovery Console. ...
    (microsoft.public.win2000.general)
  • Re: WinSxS, functional under 2k ?
    ... The newSide-by-Side Assembly technology was introduced with Windows XP to help reduce or eliminate DLL Hell. ... If you recall earlier Windows versions, like Windows 95, when you installed an application you were warned if the installer tried to replace a DLL from the system folder with an older version and you were asked if you wanted to accept the change. ... Until Windows XP it wasn't so easy to use different versions of shared system DLLs, that is what the new Side-by-Side assemblies attempts to resolve. ...
    (microsoft.public.win2000.general)
  • Re: Determine name and path of dropped object?
    ... MDE I would really suggest the use of external DLL to hold the subclassing ... windows after loading the Microsoft Office Visual Basic Editor, ... Public Declare Sub DragAcceptFiles Lib "shell32.dll" _ ...
    (microsoft.public.access.modulesdaovba)