JWS can't find dependent native library

Hi,
my JNLP file contains the following snippet
<resources os="Windows">
<nativelib href="lib/windows/corelib.jar"/>
</resources>
where corelib.jar contains several DLL files. The first DLL depends on others contained in the same jar file. Lauching the program under Windows via JWS, the first DLL is loaded, but it can't resolve the depencies. It seems to me, that Windows searches in the PATH, but there is no corresponding entry. (I also tried to put every DLL in a separate jar file, but that doesn't work either.)
Any suggestions who to solve this problem?

Try loading each dependent DLL from the Jar File individually, in reverse order( First load the DLL which not dependent on any other, then next level and so on). It might work this way.

Similar Messages

  • Dll on Tomcat 6 got UnsatisfiedLinkError ... Can't find dependent libraries

    I created a dll file and it ran with no errors on the command line. But when i deployed it together with the java class file over to Tomcat 6.0\lib and ran it with a web application, Tomcat's log file reported:
    Exception in thread "Thread-12" java.lang.UnsatisfiedLinkError: C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\Binless.dll: Can't find dependent libraries
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(Unknown Source)
         at java.lang.ClassLoader.loadLibrary(Unknown Source)
         at java.lang.Runtime.loadLibrary0(Unknown Source)
         at java.lang.System.loadLibrary(Unknown Source)
         at jni.server.Binless.<clinit>(Unknown Source)
         at org.brainml.analysisserver.queue.ProcessItemThread.run(ProcessItemThread.java:57)
    Here is what I did:
    Step 1: Compile and manifest
    "%MSVCDir%\bin\cl.exe" /I"%JAVA_HOME%\include" /I"%JAVA_HOME%\include\win32" /MD /LD /FeBinless.dll ../info/binless/jni_binless.c ../jni_shared/jni_gen_c.c ../jni_entropy/jni_entropy_c.c ../../entropy/entropy_nsb_c.cpp /link libxml2.lib libgsl.a libgslcblas.a >> binless-out.txt
    mt.exe -manifest Binless.dll.manifest -outputresource:Binless.dll;2
    The operating system is Windows XP and has the following environment variables:
    PATH=%JAVA_HOME%\bin;%LIBXMLDir%\bin;%ICONVDir%\bin;%GNUWINDir%\bin;%WINSDKDir%\bin;%MSVCDir%\bin;%MSVCDir%\..\Common7\IDE;%ZLIBDir%\bin;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem
    INCLUDE=%WINSDKDir%\include;%GNUWINDir%\include;%MSVCDir%\include;%MSVCDir%\PlatformSDK\include;%JAVA_HOME%\include;%JAVA_HOME%\include\win32;%LIBXMLDir%\include;%ICONVDir%\include;%ZLIBDir%\include
    LIB=%WINSDKDir%\lib;%GNUWINDir%\lib;%MSVCDir%\lib;%MSVCDir%\PlatformSDK\lib;%LIBXMLDir%\lib;%ICONVDir%\lib;%ZLIBDir%\lib
    where:
    GNUWINDir=c:\project\lib\GnuWin32
    ZLIBDir=c:\project\lib\zlib
    ICONVDir=c:\project\lib\iconv
    LIBXMLDir=c:\project\lib\libxml2
    WINSDKDir=C:\Program Files\Microsoft SDKs\Windows\v6.0A
    MSVCDir=C:\Program Files\Microsoft Visual Studio 9.0\VC
    Step 2: Compile the Java jni code
    javac -d ..\classes ..\server\Binless.java
    Step 3: Ran the code
    java -classpath ..\classes jni.test.test_binless
    Successful with no errors.
    Step 4: Copied Binless.dll and Binless.class in a jar file (Binless.dll NOT in the jar file) to Tomcat 6.0\lib, and then ran a web application that called the Binless class.
    Got UnsatisfiedLinkError (see above) in Tomcat's log file.
    Am I missing something? Any help is greatly appreciated. Thank you.

    Problem:- Hi i was trying to gererate a dll through make file using CL command using visual studio 2005 on windows 2008 (64 bit) machine. Although i was able to generate DLL file but while using this DLL file by JNI it was throwing can't find dependent libraries.
    1. I used Dependency walker to check for dependent dll's(error on msvcr80.dll and etc).
    2. On visual studio 2005 there are certain things: Visit link http://msdn.microsoft.com/en-us/library/ms235342(v=vs.80).aspx
    Solution:- I have added mt.exe -manifest ../../generated/MyLibrary.dll.manifest - outputresource:"../../generated/MyLibrary.dll;2" just after CL command ends. it runs successfully....
    cheers
    Abi...

  • Problem with "Unreferenced Symbol", phase 3, Can't find dependent libraries

    now that I got every thing to work on Solaris, see my previous thread,
    I'm bound to move on to Windows.
    I can compile and link my C++ code but when it comes to execution I get an {color:#ff0000}<strong>UnsatisfiedLinkError</strong>{color}, complaining that it {color:#ff0000}<strong>Can't find dependent libraries</strong>{color}.
    I am printing out the java.library.path property before loading my lib and it has the necessary path to all my libs in it.
    Here my 2 questions:
    1.what do I need to do to get this to work on Windows?
    2.is it mandatory that dependent libraries are also .dll's on Windows (the library my native code needs is a .lib)?
    Thomas

    unfortunately, the exception does not say, what is missing:
    Exception in thread "Thread-6" java.lang.UnsatisfiedLinkError: I:\IcsBCM\Spectru
    m9.0\OneClick\CONTINUITY\lib\CronSpec.dll: Can't find dependent libraries
            at java.lang.ClassLoader$NativeLibrary.load(Native Method)
            at java.lang.ClassLoader.loadLibrary0(Unknown Source)
            at java.lang.ClassLoader.loadLibrary(Unknown Source)
            at java.lang.Runtime.loadLibrary0(Unknown Source)
            at java.lang.System.loadLibrary(Unknown Source)
            at MyCronSpec.<clinit>(MyCronSpec.java:20)
            at CronSpec.resolve(CronSpec.java:98)
            at MaintenanceTable.checkOverlap(MaintenanceTable.java:278)
            at MaintenanceTable.run(MaintenanceTable.java:112)
            at java.lang.Thread.run(Unknown Source)the DLL dependency walker shows me, that my DLL depends on LIBGLOBL.DLL, which indeed does not exist.
    So the big question is: why does my DLL reference this DLL?
    Following the output of gmake (compilation and linkage):gmake -f Makefile.i386
    cxx -W/wd4996 -W/wd4430 -W/EHsc -W/GR -W/Zc:wchar_t,forScope-  -D_CRT_SECURE_NO_WARNINGS -W/wd4996
    -D_USE_32BIT_TIME_T -DWIN32_LEAN_AND_MEAN -DWIN32 -D_WIN32_WINNT=0x0400 -DFD_SETSIZE=256
    -DATL_NO_LEAN_AND_MEAN -D__BASEFILENAME__=\\\"MyCronSpec.cc\\\" -DRWDLL -DRW_MULTI_THREAD -DNOMINMAX
    -D__EXTENSIONS__ -DCSEXPORT= -IE:/Java/jdk1.6.0_06/include -IE:/Java/jdk1.6.0_06/include/win32
    -IE:/Spectrum/SDK/include/GLOBL -IE:/Spectrum/SDK/include/PORT  -c -o OBJS.i386/MyCronSpec.o  MyCronSpec.cc
    MyCronSpec.cc
    link /DLL /out:CronSpec.dll OBJS.i386/MyCronSpec.o  E:/Spectrum/lib/libGlobl.lib
    Microsoft (R) Incremental Linker Version 8.00.50727.762
    Copyright (C) Microsoft Corporation.  All rights reserved.
       Creating library CronSpec.lib and object CronSpec.expas can be seen, I'm linking with a library called *libGlobl.{color:#ff0000}lib{color}* (since it contains the C++ code I want to wrap).
    But why/how is this turned into a reference to *libGlobl.{color:#ff0000}dll{color}?*
    Thomas
    PS: my knowledge of compilation/linking/DLLs/etc on Windows if fairly limited....

  • Java.lang.UnsatisfiedLinkError.Can't find dependent libraries

    Hello,
    I call in an applet a library "ezmodJava.dll" in order to execute a native method. It works very well in my computer (Windows 98). I've put "ezmodJava.dll" and a dependent library "ezmod.dll" in directory C:\Windows. That works very well.
    Now , i try to run the applet in a station(Windows XP) (in a network). I've installed the libraries "ezmodJava.dll" and "ezmod.dll" in C:\windows, but it doesn't work. I've put them in C:\windows\system and in C:\windows\system32 but no way. The last error i had IS :
    java.lang.UnsatisfiedLinkError: C:\WINDOWS\system32\EzmodJava.dll: Can't find dependent libraries
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(Unknown Source)
         at java.lang.ClassLoader.loadLibrary(Unknown Source)
         at java.lang.Runtime.loadLibrary0(Unknown Source)
         at java.lang.System.loadLibrary(Unknown Source)
         at Ezmod.getSolution(Ezmod.java:51)
         at app.validation.algos.lp.LPEzmod.getEzmodSolution(LPEzmod.java:213)
         at app.validation.algos.lp.LPEzmod.solveProblem(LPEzmod.java:85)
         at app.validation.algos.lp.LinearProblem.init(LinearProblem.java:93)
         at app.validation.algos.lp.LinearProblem.<init>(LinearProblem.java:73)
         at app.validation.Evaluation.solveLPProblem(Evaluation.java:1233)
         at app.validation.Evaluation$1.run(Evaluation.java:1061)
    Any help will be appreciated. Thank you too much.

    on your computer you might have multiple copies of the dll. try temporarily renaming the dll...then run the program. if it runs, you know you have another copy somewhere. do a search and find the extra copy...rename it and run your program. your program should fail then and you will find which directory your program is looking in for the dll.
    txjump

  • Please help...Can't find dependent libraries.

    I've searched and read, and tried several things but every time I run my application I get this:
    java.lang.UnsatisfiedLinkError: C:\JBuilderX\Projects\AlwaysOnTop\AlwaysOnTop.dll: Can't find dependent libraries
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
         at java.lang.System.loadLibrary(System.java:834)
         at alwaysontop.MainFrame.<clinit>(MainFrame.java:108)
         at alwaysontop.AlwaysOnTopApp.<init>(AlwaysOnTopApp.java:22)
         at alwaysontop.AlwaysOnTopApp.main(AlwaysOnTopApp.java:68)
    Exception in thread "main"
    Here is exactly what I did, maybe someone can spot what I did wong:
    1) Created AlwaysOnTop like this:
    package alwaysontop;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class MainFrame extends JFrame
    static
       System.loadLibrary("AlwaysOnTop");
       //Runtime.getRuntime().loadLibrary("AlwaysOnTop"); //Tried this too...same thing
      public static native void setWindowAlwaysOnTop(String title, boolean flag);
    ...2) I then built the application
    3) I opened a command prompt and went to the classes directory just on top of alwaysontop directory. It looks like this:
    C:\Projects\AlwaysOnTop\classes\alwaysontop
    So, I was in the C:\Projects\AlwaysOnTop\classes level
    3) Next I generated the header file like this:
    javah -jni -classpath alwaysontop MainFrame
    4) Copied MainFrame.h over to the CPP project area.
    5) Created a C file (not a C++, tried that first, then tried C style after reading something that recomended it). This file looks like this:
    #include "jni.h"
    #include "MainFrame.h"
    #include <stdio.h>
    #include <windows.h>
    #pragma argsused
    int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
            return 1;
    JNIEXPORT void JNICALL Java_Win32Native_setWindowAlwaysOnTop(JNIEnv *env, jclass obj, jstring strWindowTitle, jboolean bAlwaysOnTop)
            HWND hwnd = NULL;
            const char *str = (*env)->GetStringUTFChars(strWindowTitle,0);
            hwnd = ::FindWindow(NULL,str);
            (*env)->ReleaseStringUTFChars(strWindowTitle,str);
            if (bAlwaysOnTop)
              SetWindowPos((HWND) hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
            else
              SetWindowPos((HWND) hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
            return;
    }6) Copied the DLL that got generated to thw Windows\System32 directory.
    7) Ran the application from JBuilder.
    8) Got the error...banged head into wall for umteenth time.
    Note that the java.library.path looks like this:
    C:\JBuilderX\jdk1.4\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\DMI\WIN32\BIN;C:\Program Files\Microsoft SDK\Bin\.;C:\Program Files\Microsoft SDK\Bin\WinNT\.;C:\JavaSDKs\j2sdk1.4.2_01\bin;C:\Ant\bin; ...
    So the C:\Windows\System32 is there!
    What do I need to do for Java to be able to find the dependant libraries?
    THANKS!

    Make sure your DLL exports a function named exactly
    Java_alwaysontop_MainFrame_setWindowAlwaysOnTop
    without any C++ name mangling or other mismatch. You
    can use a tool like dumpbin for this.
    -slj-
    You might be on to something. I couldn't get dumpbin working (no output...tried several options) so I used another tool and it showed the following as exports:
    Entry Point = 004020F8h
    Ordinal = 1
    Name = __CPPdebugHook
    That is all! The imports look correct, so I think there really is nothing else being exported.
    Here is what my AlwaysOnTop.c file looks like:
    #include "jni.h"
    #include "alwaysontop_MainFrame.h"
    #include <stdio.h>
    #include <windows.h>
    #pragma argsused
    int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
            return 1;
    JNIEXPORT void JNICALL Java_alwaysontop_MainFrame_setWindowAlwaysOnTop(JNIEnv *env, jclass obj, jstring strWindowTitle, jboolean bAlwaysOnTop)
            HWND hwnd = NULL;
            const char *str = (*env)->GetStringUTFChars(strWindowTitle,0);
            hwnd = ::FindWindow(NULL,str);
            (*env)->ReleaseStringUTFChars(strWindowTitle,str);
            if (bAlwaysOnTop)
              SetWindowPos((HWND) hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
            else
              SetWindowPos((HWND) hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
            return;
    }My generated header file looks like this:
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class alwaysontop_MainFrame */
    #ifndef _Included_alwaysontop_MainFrame
    #define _Included_alwaysontop_MainFrame
    #ifdef __cplusplus
    extern "C" {
    #endif
    #undef alwaysontop_MainFrame_FOCUS_TRAVERSABLE_UNKNOWN
    #define alwaysontop_MainFrame_FOCUS_TRAVERSABLE_UNKNOWN 0L
    #undef alwaysontop_MainFrame_FOCUS_TRAVERSABLE_DEFAULT
    #define alwaysontop_MainFrame_FOCUS_TRAVERSABLE_DEFAULT 1L
    #undef alwaysontop_MainFrame_FOCUS_TRAVERSABLE_SET
    #define alwaysontop_MainFrame_FOCUS_TRAVERSABLE_SET 2L
    /* Inaccessible static: focusTraversalKeyPropertyNames */
    /* Inaccessible static: LOCK */
    /* Inaccessible static: dbg */
    /* Inaccessible static: isInc */
    /* Inaccessible static: incRate */
    #undef alwaysontop_MainFrame_TOP_ALIGNMENT
    #define alwaysontop_MainFrame_TOP_ALIGNMENT 0.0f
    #undef alwaysontop_MainFrame_CENTER_ALIGNMENT
    #define alwaysontop_MainFrame_CENTER_ALIGNMENT 0.5f
    #undef alwaysontop_MainFrame_BOTTOM_ALIGNMENT
    #define alwaysontop_MainFrame_BOTTOM_ALIGNMENT 1.0f
    #undef alwaysontop_MainFrame_LEFT_ALIGNMENT
    #define alwaysontop_MainFrame_LEFT_ALIGNMENT 0.0f
    #undef alwaysontop_MainFrame_RIGHT_ALIGNMENT
    #define alwaysontop_MainFrame_RIGHT_ALIGNMENT 1.0f
    #undef alwaysontop_MainFrame_serialVersionUID
    #define alwaysontop_MainFrame_serialVersionUID -7644114512714619750i64
    /* Inaccessible static: metrics */
    /* Inaccessible static: class_00024java_00024awt_00024Component */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024ComponentListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024FocusListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024HierarchyListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024HierarchyBoundsListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024KeyListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024MouseListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024MouseMotionListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024MouseWheelListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024InputMethodListener */
    /* Inaccessible static: class_00024java_00024beans_00024PropertyChangeListener */
    #undef alwaysontop_MainFrame_serialVersionUID
    #define alwaysontop_MainFrame_serialVersionUID 4613797578919906343i64
    /* Inaccessible static: dbg */
    #undef alwaysontop_MainFrame_INCLUDE_SELF
    #define alwaysontop_MainFrame_INCLUDE_SELF 1L
    #undef alwaysontop_MainFrame_SEARCH_HEAVYWEIGHTS
    #define alwaysontop_MainFrame_SEARCH_HEAVYWEIGHTS 1L
    /* Inaccessible static: class_00024java_00024awt_00024Container */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024ContainerListener */
    /* Inaccessible static: class_00024java_00024awt_00024KeyboardFocusManager */
    /* Inaccessible static: systemSyncLWRequests */
    #undef alwaysontop_MainFrame_OPENED
    #define alwaysontop_MainFrame_OPENED 1L
    /* Inaccessible static: nameCounter */
    #undef alwaysontop_MainFrame_serialVersionUID
    #define alwaysontop_MainFrame_serialVersionUID 4497834738069338734i64
    /* Inaccessible static: dbg */
    /* Inaccessible static: class_00024java_00024awt_00024Window */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024WindowListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024WindowFocusListener */
    /* Inaccessible static: class_00024java_00024awt_00024event_00024WindowStateListener */
    #undef alwaysontop_MainFrame_DEFAULT_CURSOR
    #define alwaysontop_MainFrame_DEFAULT_CURSOR 0L
    #undef alwaysontop_MainFrame_CROSSHAIR_CURSOR
    #define alwaysontop_MainFrame_CROSSHAIR_CURSOR 1L
    #undef alwaysontop_MainFrame_TEXT_CURSOR
    #define alwaysontop_MainFrame_TEXT_CURSOR 2L
    #undef alwaysontop_MainFrame_WAIT_CURSOR
    #define alwaysontop_MainFrame_WAIT_CURSOR 3L
    #undef alwaysontop_MainFrame_SW_RESIZE_CURSOR
    #define alwaysontop_MainFrame_SW_RESIZE_CURSOR 4L
    #undef alwaysontop_MainFrame_SE_RESIZE_CURSOR
    #define alwaysontop_MainFrame_SE_RESIZE_CURSOR 5L
    #undef alwaysontop_MainFrame_NW_RESIZE_CURSOR
    #define alwaysontop_MainFrame_NW_RESIZE_CURSOR 6L
    #undef alwaysontop_MainFrame_NE_RESIZE_CURSOR
    #define alwaysontop_MainFrame_NE_RESIZE_CURSOR 7L
    #undef alwaysontop_MainFrame_N_RESIZE_CURSOR
    #define alwaysontop_MainFrame_N_RESIZE_CURSOR 8L
    #undef alwaysontop_MainFrame_S_RESIZE_CURSOR
    #define alwaysontop_MainFrame_S_RESIZE_CURSOR 9L
    #undef alwaysontop_MainFrame_W_RESIZE_CURSOR
    #define alwaysontop_MainFrame_W_RESIZE_CURSOR 10L
    #undef alwaysontop_MainFrame_E_RESIZE_CURSOR
    #define alwaysontop_MainFrame_E_RESIZE_CURSOR 11L
    #undef alwaysontop_MainFrame_HAND_CURSOR
    #define alwaysontop_MainFrame_HAND_CURSOR 12L
    #undef alwaysontop_MainFrame_MOVE_CURSOR
    #define alwaysontop_MainFrame_MOVE_CURSOR 13L
    #undef alwaysontop_MainFrame_NORMAL
    #define alwaysontop_MainFrame_NORMAL 0L
    #undef alwaysontop_MainFrame_ICONIFIED
    #define alwaysontop_MainFrame_ICONIFIED 1L
    #undef alwaysontop_MainFrame_MAXIMIZED_HORIZ
    #define alwaysontop_MainFrame_MAXIMIZED_HORIZ 2L
    #undef alwaysontop_MainFrame_MAXIMIZED_VERT
    #define alwaysontop_MainFrame_MAXIMIZED_VERT 4L
    #undef alwaysontop_MainFrame_MAXIMIZED_BOTH
    #define alwaysontop_MainFrame_MAXIMIZED_BOTH 6L
    /* Inaccessible static: nameCounter */
    #undef alwaysontop_MainFrame_serialVersionUID
    #define alwaysontop_MainFrame_serialVersionUID 2673458971256075116i64
    /* Inaccessible static: class_00024java_00024awt_00024Frame */
    #undef alwaysontop_MainFrame_EXIT_ON_CLOSE
    #define alwaysontop_MainFrame_EXIT_ON_CLOSE 3L
    /* Inaccessible static: defaultLookAndFeelDecoratedKey */
    /* Inaccessible static: class_00024alwaysontop_00024MainFrame */
    * Class:     alwaysontop_MainFrame
    * Method:    setWindowAlwaysOnTop
    * Signature: (Ljava/lang/String;Z)V
    JNIEXPORT void JNICALL Java_alwaysontop_MainFrame_setWindowAlwaysOnTop
      (JNIEnv *, jclass, jstring, jboolean);
    #ifdef __cplusplus
    #endif
    #endifDoes anyone see anything wrong with that?
    Maybe I should use another compiler (VC++ maybe)?

  • UnsatisfiedLinkError: Can't find dependent libraries

    Hello,
    Am currently developing an application based on JNI. I have, after linking required libraries in c and compiling it, created a dll file 'hidapi.dll', which i load in java program via System.loadLibrary("hidapi") and compile it. When i run it in my machine (after of course, putting the dll file in System32 folder - Am using Wn 7 for your info.. ), the code runs perfectly fine. So far so good.
    But when i put the dll file in another machine the dll file is not getting loaded... My code gives an exception java.lang.UnsatisfiedLinkError: C:\Windows\System32\hidapi.dll: Can't find dependent libraries... When i tried to have the verbose messages through -verbose:jni , I get the following message.
    [Dynamic-linking native method java.io.FileOutputStream.writeBytes ... JNI]
    Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: C:\Window
    s\System32\hidapi.dll: Can't find dependent libraries
    [Dynamic-linking native method java.lang.Throwable.getStackTraceDepth ... JNI]
    [Dynamic-linking native method java.lang.Throwable.getStackTraceElement ... JNI]
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)[Dynamic-linking native method sun.awt.windows.WComponentPeer.nativeHandleEvent ... JNI]
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at hidsignalapi.UsbPctoolJni.<clinit>(UsbPctoolJni.java:46)
    hidsignalapi.UsbPctoolJni is the class where i load the dll file, and line 46 is exactly the line where i wrote 'System.loadLibrary("hidapi");'
    I saw in a few forums to ensure the class names are correct... But if that is the case, it must not run in my system too right? The only linked files are jni.h and a custom library hidapi.h. Should the hidapi.h too must be put in classpath? Has any body has any idea about this..?
    Thanks,
    Sreram

    It is technically possible to create a C/C++ application without using compiler libraries but it that is an esoteric subject that has nothing to do with anything you might be doing with JNI.That is exactly, being a java programmer, where am stuck.
    I am rather certain that the missing component, hidapi.dll, has nothing to do with C/C++ compiler libraries. Yes. I, in my Java code, am loading the hidapi.dll dynamically, to perform some communication with the USB device, which is a JNI C dll, I created using VS2010 and the C code uses the static library setupapi.lib (for communicating directly with the OS).
    And unless you have a static library for that, which is not the same as the dll, there is no way you are going to link to that statically.I have MS SDK V7.0A pre-installed (along with Visual Studio - VS2010) in my system which has the library. So it works in my System (Windows 7). Problem arises only when i try to run the same code in another system, which has no VS.
    Realistically what it really comes done to is that you must understand what dependencies your own application has first before you explore the options for delivering it.That is exactly what i am trying to do here.
    Now i have a few questions here.
    One: Do i need to install SDK in every system for the static linking and in tun my code to work? Or will it suffice if i put the setupapi.lib in path? Or should i convert the static linking to dynamic linking? (I realize i am asking more of C related questions in a Java forum, but I am sure your answers will help me in creating a working code.)
    Two: After pathetically failing to create a working dll with VS2010, I tried to compile the code using Mingw gcc compiler and my code (C & JNI code) compiles successfully, but I do not know how to create a dll file by properly linking with the library files.
    After compiling the code with the -c option, creating hid.o for the hid class and hidapi_wrap.o for the JNI wrapper, I tried to create a dll with the following command.
    D:\Sreram>gcc -Wl,-kill-at -o hidapi.dll hidapi_wrap.o hid.o
    hid.o: In function `hid_enumerate':
    D:\Sreram/hid.c:286: undefined reference to `_imp__SetupDiGetClassDevsA@16'
    D:\Sreram/hid.c:295: undefined reference to `_imp__SetupDiEnumDeviceInterfaces@20'
    D:\Sreram/hid.c:310: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailA@24'
    D:\Sreram/hid.c:324: undefined reference to `_imp__SetupDiGetDeviceInterfaceDetailA@24'
    D:\Sreram/hid.c:463: undefined reference to `_imp__SetupDiDestroyDeviceInfoList@4'
    c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../libmingw32.a(main.o): In function `main':
    C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference to `WinMain@16'
    collect2: ld returned 1 exit status
    Obvious that the linker has no clue about these functions which are defined in external library 'Setupapi.lib' & setupapi.dll and hence I tried linking the file by adding the command '-lsetupapi.lib' (without 's), '-llibsetupapi.a' and -l'setupapi.dll' in vain. The compiler says
    c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -llibsetupapi.a (with whatever linker option i give)
    collect2: ld returned 1 exit status
    What am i doing wrong here?
    And three: Even if i succeed in creating a working dll, will it work in other Windows operating systems - I know i had to create a separate library file (.so) in linux and whatever in mac - like Windows XP, Windows Server 2003, etc.?
    Thanks for your patient replies and excuse me for such a long reply.
    Sreram

  • Can't find dependent libraries

    Hi,
    I try to load a DLL, but I get an exception.
    public class JNIExportToX {
    // load library JNIExportToX into JVM
    static {
    System.loadLibrary( "JNIEXTERNAL" );
    public native boolean EXTERNAL_ParametersChange(String param1);
    Caused by: java.lang.UnsatisfiedLinkError: S:\Proj_pc\WEB\Project\JNIEXTERNAL.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1030)
    what can be the problem?
    Thanks,
    Anat

    Hi,
    Your dll is trying to load another dll that is not in the path.
    You may call System.load("F:\\ull\\Path\\Of\\The\\Dependant.DLL"); to workaround this problem.
    --Marc (http://jnative.sf.net)                                                                                                                                                                                                                                                                                                                                                                                                                               

  • "Can't find dependent libraries" Query

    I created a sample.dll using VC++ which inturn uses java libraries. I
    was getting 'file.obj : error LNK2001: unresolved external symbol
    __imp__JAWT_GetAWT@8' link error while creating sample.dll even after
    providing jawt.dll path. So used jre/lib/jawt.lib to create the
    sample.dll. I am using this sample.dll to run a java program. While
    running the java program, I am getting the error 'Exception in thread
    "main" ava.lang.UnsatisfiedLinkError: sample.dll: Can't find dependent
    libraries'. If I don't use jawt.lib (by commenting relevant code) to
    create sample.dll, my java program runs fine.
    But I need to use the code relevant to jawt.lib. Any idea how to over
    come Can't find dependent libraries error?

    You need to link against "jawt.lib"
    E.g.
    In VC++ goto
    Projects -> Settings ->Link Tab
    Add jawt.lib to the Object/Library modules and Project Options.

  • Single Sign On - SAPSSOEXT - Can't find Dependant Libraries

    HI
      I am trying to implrement SSO to another server running in IBM Websphere 5.1
    In my java code System.LoadLibrary fails for SAPSSOEXT and error message is "Can't find Dependant Libraries"
    concerned java code is
    public static String SSO2TICKETLIBRARY = "sapssoext";
    try {
    System.loadLibrary(SSO2TICKETLIBRARY);
      } catch (Throwable e) {
    System.out.println ("Error during initialization of SSO2TICKET:\n" + e.getMessage());
    Both of  sapssoext.dll and sapsecu.dll are in c:\windows\system32 folder and I have downloaded the files relevant to my OS from SAP service marketplace.
    Version of sapsecu.dll 6400.243.0.0
    and version of sapssoext 5.4.28.5
    I have used SAPSECULIB54_3-10002911.SAR
    and SAPSSOEXT_4-10002921.SAR for those files
    OS where IBM websphere is run is Windows 2000
    c:\windows\system32 is very much in the path and undoutably it finds sapssoext.dll. Probably it requires some other dependant dll.
    How can I trace to find which library is missing
    Regards
    Saurav

    I resolved it myself

  • Java.lang.UnsatisfiedLinkError: ocijdbc9.dll: Can't find dependent librarie

    Hi all,
    I have written a simple code to connect to Oracle9i in WindowsXP.
    Oracle is installed and running on Linux machne on the Intranet.
    I have set 'classes12.jar' in classpath and placed following dlls in "C:\WINDOWS\system32" path
    ocijdbc9.dll
    ocijdbc9_g.dll
    heteroxa9.dll
    heteroxa9_g.dll
    Following is the part of code:
    public String dbName = new String("jdbc:oracle:oci8:username/password@sid_192.168.0.128");
    public String dbClassName = new String("oracle.jdbc.driver.OracleDriver");
    Class.forName(dbClassName);
    conection = DriverManager.getConnection(dbName);
    statement = conection.createStatement();
    When I run this code got following errors:
    java.lang.UnsatisfiedLinkError: C:\WINDOWS\system32\ocijdbc9.dll: Can't find dependent libraries
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
         at java.lang.System.loadLibrary(System.java:834)
         at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:262)
         at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
         at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:193)
         at menus.SQLShelfManager.openDBconnecton(SQLShelfManager.java:46)
         at menus.SQLShelfManager.main(SQLShelfManager.java:129)
    Exception in thread "main"
    Please guide me, what I am missing? Thanks in advance...

    There are only a very very few and rare good reasons to use the oci8 driver with Java (and I can't remember any of them at the moment). Performance is not one of them. If at all possible, you should use the Type IV (thin) driver instead.
    The classes12.jar (or zip) is for use with Java 1.2 and 1.3. There are different versions of this jar for each version of the database, but they're fundamentally cross-compatible; all the post-8i drivers are supposed to work with all the post-8i databases (and the 8i stuff also mostly works too). There's been a succession of bug fixes and minor functional changes, as well as some very substantial perfromance improvements. If you are developing brand-new code, I very stongly encourage you to use the very latest driver (currently 10.2.0.1, I think). If you are using a Java version greater than 1.3, then you should use the ojdbc14.jar instead (and don't try to use both classes12.jar and ojdbc14.jar, they have the sameclasses in them). I think the 10.2.0.1 ojdb14.jar was the first one certified for Java 1.5, and it's significantly faster than the 9i drivers. Anyone considering an upgrade of drivers should plan to do a good regression test; as mentioned before, there are some very small functional differences. You can download the latest drivers here:
    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
    If you insist on using oci, then you probably need to do an Oracle client installation on your Windows box. If you stay with the 9i driver, the full client install is huge; however, you can almost certainly use the 10g "Instant Client", which is a pared-down version, with just the minimal stuff to support an application. That's available here:
    http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html

  • Java.lang.UnsatisfiedLinkError: D:\...*dll: Can't find dependent libraries

    Hello,
    Every time I try run my application I get this:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\Java_przyklady\Met
    ody_macierzyste\HelloNative.dll: Can't find dependent libraries
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1485)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at HelloNative.<clinit>(HelloNative.java:12)
    at HelloNativeTest.main(HelloNativeTest.java:10)
    This application is example which was provided with book- Core Java 2
    Here is exactly what I have:
    HelloNative.java
    class HelloNative
       public static native void greeting();
       static
          System.loadLibrary("HelloNative");
    }HelloNativeTest.java
    class HelloNativeTest
       public static void main(String[] args)
           HelloNative.greeting();
    }Here is my HelloNative.c
    #include "HelloNative.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL Java_HelloNative_greeting(JNIEnv* env,
       jclass cl)
       printf("Hello world!\n");
    }and HelloNative.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class HelloNative */
    #ifndef _Included_HelloNative
    #define _Included_HelloNative
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     HelloNative
    * Method:    greeting
    * Signature: ()V
    JNIEXPORT void JNICALL Java_HelloNative_greeting
      (JNIEnv *, jclass);
    #ifdef __cplusplus
    #endif
    #endifI did:
    javac HelloNative.java (I got HelloNative.class)
    javah HelloNative (I got HelloNative.h)
    gcc -c -D__int64="long long" -Ic:\j2sdk1.4.2\include\ -Ic:\j2sdk1.4.2\include\win32 HelloNative.c (I got HelloNative.o)
    dllwrap --add-stdcall-alias -o HelloNative.dll HelloNative.obut here I got:
    dllwrap: no export definition file provided
    Creating one, but that may not by what you wantand
    HelloNative.dll
    May by I made mistake used dllwrap, what this feedback means for me?
    So, when I did everything what I wrote abow I got:
    HelloNative.class
    HelloNative.h
    HelloNative.o
    HelloNative.dll
    and I run
    HelloNativeTest.class and I got above Error
    I use j2sdk1.4.2 and Windows XP
    Could anybody tell me what I did wrong???
    I will be appreciate

    The "Native Methods" forum is for JNI questions.
    See this thread...
    http://forum.java.sun.com/thread.jspa?forumID=52&threadID=534964

  • How can I transfer my stickienotes data to a new computer? I can't find it in Library as I should

    How can I transfer my stickienotes data from my imac to a new macbook air computer? I can't find it in Library as I should.

    You can download CS4 here. Download CS4 products
    Most comments I've seen say CS4 needs to be run in compatibility mode on Win 8.1. Windows 8.1 compatibility for Adobe Photoshop CS4 version 11
    But the only way to know for sure is to try it.

  • I was trying to add an itunes library to my computer, and now my itunes library can not be found. An ipod can be synced with only one iTunes library at a time. How can I find my Itunes library, complete with playlists ?

    I was trying to add an itunes library to my computer, and now my itunes library can not be found. An ipod can be synced with only one iTunes library at a time. How can I find my Itunes library, complete with playlists ?

    I have the same problem too and tried alot of things like time zone , restarting or changing DNS of wifi connection to 8.8.8.8 still nothing happens .. !!
    iPhone 5s, iOS 8.3

  • HssJNIDriver931.dll: Can't find dependent libraries

    what error?
    org.apache.jasper.JasperException: C:\Hyperion\common\ADM\9.3.1\Essbase\9.3.1\bin\HssJNIDriver931.dll: Can't find dependent libraries
    I install this
    essbase server
    essbase client
    essbase admininstrator
    application builder
    tomcat 5.5
    Edited by: [email protected] on 2009. 2. 19 오후 6:35

    Hi,
    Where are you getting the error from ? what product
    You should have a directory :- \Hyperion\common\ADM\9.3.1\Essbase\9.3.1\bin
    which contains HssJNIDriver931.dll and others.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • ITunes can't find my music library. Pleas help!

    I just upgraded my iTunes. Next time I tried opening it a window appeared that read: "Can't find your iTunes Library..."
    I tried searching by opening start/computer/iTunes but the file that has all my music was renamed to: bd4765ae206e5a7a782a28f08509 and when I tried opening it all I found was a list of 4 files that I can't open.
    I know all my music is still there because the file still uses 125 GB in my computer, but I can't seem to run iTunes or I can't seem to point iTunes into finding my music.
    Please anyone help!!!

    If you did not rename that file, then I am a little worried there might be a larger problem looming (malware, etc.). If this is so, then finding the file might not even help.
    I recommend restoring from a backup. If the backup was made before this file changed, then you should be fine.
    If you would like to stick with what you've got, then this Apple Support article should provide you with the instructions you need: http://support.apple.com/kb/HT1391
    Best!

Maybe you are looking for

  • Query structure problem

    Hi, I need to create a query with a column structure described bellow: Key figure .................|.. 0Quantity .....|.. 0Amount Posting period ...........|.. # .................|.. Var1 (5,6, 7, ... 12) The problem is that the column 0quantity shou

  • Syncing mail between iMac G5 and Macbook Pro

    I work at home on a G5 and regularly read and then delete or file my emails. I regularly sync between my G5 and Macbook Pro, which I use when traveling. My syncing routine works fine with the address book, calendar, etc., but when I go my Macbook Pro

  • Web Service Client encoding style error

    Hi all, I have a created a java static stub client (created with wscompile from the wsdp). If I run the client I receive the following error "unexpected encoding style: expected=http://schemas.xmlsoap.org/soap/encoding/..." I am using a delphi web se

  • License Validity date - Very Important for me

    He Experts, Today I have installed R/3 Permanent License Key ( Till date  31.12.9999 ) on production server  from www.service.sap.com because tomorrow will expired temporary (2.9.2010) license key. But at the time of new sap login , it shows temporar

  • VM in state Shutting down forever

    After a Live Migration one of my VMs was frozen. Manager still showed it as running. I chose "Power Off" for that VM in Manager and now it is stuck in state "Shutting down". I rebooted the server this VM was running on and restarted the manager but n