Usage of DLL (or .so) file with JNI

Hello,
I have read the example at
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html
but I have one problem.
If I understood this example well, then I have to have access to the header file of my DLL file.
My problem is that I only have a compiled version of dll file from a 3rd party.
Is it possible to use JNI to call functions from it in JAVA?
Give me some hint please as I'm not very familiar with linking and other C stuff.
Thanks.

Right, I know that.
My question was rather: do I have to have the header file of the library?
Following the discussion from here for instance:
http://forum.java.sun.com/thread.jspa?forumID=52&threadID=596791
he says that he has dll, so, and .h. But I only have dll and .so.
And that's really the question.
Thanks.

Similar Messages

  • Nilibddc dll: opening tdms files with corrupt index files

    Hi there,
    i have a question regarding error handling, when using the nilibddc.dll.
    I want to use nilibddc.dll to open .tdms files. At the time i'm experimenting with some error cases and got stuck in one case:
    When i try to open a .tdms file with a corrupt .tdms_index file i get the error code -6211 (DDC_StorageCouldNotBeOpened).
    The .tdms_index file is corrupt because of errors while copying the file.
    The problem i noticed is, that i have a file lock on the corrupt .tdms_index file after DDC_OpenFile(...) (i can rename it, but i can't delete the file!?).
    As you can see in the code snippet - it isn't really special...
    int ddcError = 0, length;
    DDCFileHandle file = 0;
    ddcError = DDC_OpenFile (FILE_PATH, NULL, &file);
    // here i get ddcError == -6211
    if( ddcError == 0 )
    // do something with the file...
    ddcError = DDC_CloseFile(file);
    if( ddcError == 0 )
    cout << "no error - everything done" << endl;
    system("PAUSE");
     Do i miss something here? Should i use DDC_FreeMemory in somehow to release opened handles?
     I also tried to use the DDC_OpenFileEx(...) with readOnly set to true. But this doesn't change anything!
    Thanks in advance for help,
    Daniel
    Solved!
    Go to Solution.

    Hi there,
    thanks for the replies (and sorry for my late answer).
    The code above is from a simple Visual C++ Project that i use to run some tests with the dll.
    If i posted the question in the wrong topic please let me know - i found some other posts dealing with the dll so i thought i'm right here.
    I attached a tdms and the corresponding "corrupt" tdms_index file.
    The file handle stays 0 when i debug my code with that file and i receive the error -6211.
    I want to use the dll as part of an application that runs as system service. It reads and writes information from/to existing tdms files. After the information is read the application moves the files. So, if the tdms_index file gets corrupt (by whatever) i have the problem, that the index file is locked as long as the service is running and the file can't be moved. I can't tell how often this happens (hopefully never) but if i can do something against it, i would like to integrate this precaution.
    Thanks in Advance for any information & have a nice day,
    Daniel
    Attachments:
    samplefile.zip ‏3 KB

  • How to read file with JNI?

    Hello,
    I want to implement a native function that has as a parameter a File type. For example:
    public native void readFile(File f);
    But as far as I know the JNI does not support File type, or I am wrong? One way to solv this problem i of course to convert the file into an array of chars end then to implement some method like:
    public native void readFile(char [] f);
    So if there is another way of solving this problem, please help me.
    Thank you in advance.:)

    I would recommend against passing a File object as a paramater. The implication of trying to do that is that you will be using the File object, which means you will be making JNI calls back into the JVM in order to do what you need to do. If there are very many of those calls, well, no fun!
    If you do it by hand, then yes, it can be very difficult and time-consuming. Jace, http://jace.reyelts.com/jace, (a free, open-source project) let's you do this sort of stuff in your native code very easily. For example,
    * A C++ function that accepts a java.io.File and reads its contents.
    void readFile( java::io::File& file ) {
      const int bufferSize = 512;
      JArray<JByte> buffer( bufferSize );
      try {
        FileInputStream input( file );
        for ( int numBytesRead = 0; bytesRead != -1; ) {
          numBytesRead = input.read( buffer, 0, bufferSize );
          // Do something with the buffer
      catch ( IOException& ioe ) {
        cout << ioe << endl;
    } is just as easy to write as straight Java, and it's all implemented using standard JNI function calls under the covers. For example, the above code results in the invocation of several JNI functions, like, NewObject, NewByteArray, CallIntMethod, FindClass, GetMethodID, ExceptionOccurred, etc...
    God bless,
    -Toby Reyelts

  • Problem in compiling C file with JNI

    Hello to all,
    I have a simple JNI tutorial
    But after creating the header file using "javah -jni " command when I use that header file in to the C implementation it gives error
    Following code is of HelloWorld.cpp in which the header file in included
    #include <stdio.h>
    #include "HelloWorld.h"
    JNIEXPORT void JNICALL Java_HelloWorld_print(JNIEnv *env, jobject obj)
         printf("Hello World!\n");
         return;
    }The error is
    line number 2 - Unable to open include file "HELLOWORLD.H"
    line number 4 - Declaration syntax errorMy java file "HelloWorld.java" is
    class HelloWorld
         private native void print();
         public static void main(String[] args)
              new HelloWorld().print();
         static
              System.loadLibrary("HelloWorld");
    }I also after coping the file into the include directory of the TurboC but same error arise.
    Please suggest me what to do.
    Thanks in advance

    Yes I used "javah -jni HelloWorld" command after complying the program.
    It produced a header file which I have placed in the same directory in which my project is. Then the same error comes, when I place it in include directory of TurboC give same error.

  • How to use VS2005 dlls with jni?

    Hello,
    I have a java application using jni and some dlls.
    Previously this dlls were created using VS2003. Now I want to use VS2005 and I
    encountered some problems.
    Everything is working on my station were I have installed VS2005 but when I try to run the
    application on other station (a test station) is not working.
    I get the following error:
    java.lang.UnsatisfiedLinkError: C:\App\Test.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(Unknown Source)
         ......First I tried to search all the dependences and copied all missing dlls from my work station to the test
    station in the application directory. Still not working.
    when dlls were made with VS2003 I had only 3 dependences: mfc71d, msvcp71d, msvcr71d. With this dlls in
    the application directory everything was fine.
    Second I tried to install .Net framework(2.0) and vcredist (VS2005_sp1) but still nothing.
    What I'm doing wrong? Is somebody which is using dlls made in VS2005 with jni?
    Thank you
    ,Dragos

    IIRC, that message means the manifest file in the DLL points to assembly that your computer doesn't have, or it has no manifest file.
    You either need to:
    -recompile using static linking so that it has no dependencies
    -stick the correct manifest in
    -include the entire SxS (site by side) assembly folders with your application (only the ones you're dependent on). These are found in something similar to:
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\x86

  • How to use a C# dll with JNI

    After a ton of issues, I finally got this working properly. I've come across a lot of forum posts about the various problems and VERY few answers so I thought I would post my solution here.
    To do this, you need to create a managed C++ layer in between C# and java. The JNI functions in C++ dll can make calls to the C# dll directly, and your java program can make calls directly to the native JNI functions. Some important notes on using C# classes in C++ are:
    -gcroot<CSClass ^> should be used on any objects that are instances of some C# class.
    -the symbol ^ should be used with all C# references (its the symbol for references)
    -gcnew should be used to allocate C# objects
    -in visual studio, add the C# dll as a reference rather than using #using <CsDLL.dll>
    -do not use #using <CsDLL.dll>
    The next issue is loading the libraries. By adding the folder your C++ dll is located in to the Djava.library.path VM argument, you can load your C++ library with System.LoadLibrary("Cppdll.dll"). You DO NOT need to load the C# dll in your java program. In fact, it will ignore you if you try. The problem with loading this dll is with how the CLR searches for referenced assemblies. The CLR First searches the DEVPATH environment variable (if the machine.config file has developer mode set to on), then it searches the GAC, then it searches the codebases, then it searchs the current executable's directory along with a list of definable subdirectories (probes).
    DEVPATH is a decent option, but it requires modifying the machine.config file to be in developer mode. Once that is done, it acts just like the PATH environment variable.
    If your C# dlls are strongly named, I would recommend adding them to the GAC or using codebases. However I have not done this and am not sure how.

    Hi,
    i have to use a c# dll in my java program .by following this link http://www.codeproject.com/KB/cross-platform/javacsharp.aspx i done that.but it is working for only one c# program.if i am trying to use a dll it is throwing error
    # An unexpected error has been detected by Java Runtime Environment:
    # Internal Error (0xe0434f4d), pid=3988, tid=3704
    # Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode, sharing windows-x86)
    # Problematic frame:
    # C [kernel32.dll+0x442eb]
    # An error report file with more information is saved as:
    # D:\Work\EclipseWorkspace\HelloInflux\hs_err_pid3988.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    Please help me out. i want a few steps to invoke a c# dll by using jni

  • Problem with JNI and Parallel Port dll

    Hi. I'm doing some testes with JNI. Firs i followed the netbeans tutorial for doing a C programa that prints somthing for java.. like.. "Hello java from C".
    So i tried to load a dll from my dll. Like, I have this dll to use the parallel port on windows Xp. So i created a dll to access it an comunicates eoth java.
    I did everything just fine.
    When I start my Java app, the first thing it does is to load this parallel port dll and configure the functions of it.
    After that .. I get this error
    EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x0093d269, pid=2284, tid=3000
    Can someone explain why ?
    (Sorry if i wasn't clear enough, english is not my native language, so ask if you don't understand something.. )

    hi ,
    I met the same problem this morning, and searched the www.google.com in order to solve it, as a result, your article was shown on my screen. :)
    Till now I have read some technical information and solved my problems. Maybe the solution be useful to you:
    ==============================
    error message : (Environment : Tomcat 5, Windows 2003, Mysql5)
    2006-3-29 11:53:48 org.apache.catalina.core.StandardWrapper unload
    message: Waiting for 2 instance(s) to be deallocated
    ==============================
    cause: the number of connection to database exceeded.another word,too many connections.
    ==============================
    solution: close the connection when it becomes useless for your program. :)
    ==============================
    ps. Sorry for my weak English . hehe ....

  • Problem processing multiple files with dll

    I'm using a function in a dll that turns a binary data file into a TSV file with actual numbers.  The function takes three inputs, a pointer to a string for the input file path, a pointer to a string for the file to write and an integer for "integrity check" which as far as I can tell does nothing.  I have the dll in a subvi, pass it a string corresponding to the input file path and let it convert the file.  This works but will only convert the first 254 files then errors out.   The only way I can get it to work again is to close labview completely and reopen it.  My experiment requires the conversion of literally thousands of files so closing and reopening labview gets old real quick.  I have tried creating a reference to the subvi and closing it for each file but this still does not work, I have also tried on windows xp and windows 7.  When the new files are created they have a size of 0 kB and are empty until I close labview then they assume a reasonable size (few kB) and have data in them.  Additionally if I try to delete one of the newly created files while labview is open I get an error saying the file is open in labview.  I can delete the files when labview is closed.  I have also tried opening each file and closing it after the conversion but that does not work either.
    I believe this is some sort of file open limitation but I don't know how to get around it, I'm almost to the point of writing one of those mouse move/button click macros nerds use for games to convert the files because this is driving me insane.

    I managed to get the c code for the dll (it was somewhere on the computer). I can only pass an integer to validity otherwise it errors, is there an unsighed char in labview?
    _declspec (dllexport) int converting(char *filetoRead, char *filetoWrite, unsighed char validity)
    FILE *fpin, *fpout;
    int result;
    int records=0;
    int valid=0;
    unsigned long MTOFL=0;
    unsigned long MT;
    struct {unsigned ADC:12;
    unsigned INVALID
    unsigned MTOV:1;
    unsigned GAP:1;
    unsigned ZERO:1;
    unsigned MTHIGH:
    unsigned R:8;
    unsigned MTLOW:
    } DataRecord;
    fpin=fopen(filetoRead,"rb");
    fpout=fopen(filetoWrite,"w");
    while(1)
    result = fread( &DataRecord,
    if (result!= 6)
    return(0);
    records++;
    if(DataRecord.MTOV)
    MTOFL += (unsign
    if(validity==1)
    if(DataRecord.INVA
    continue; // don't sav
    valid++;
    MT = (((unsigned long)Data
    fprintf(fpout,"%11lu",MTOF
    fprintf(fpout,"%5u",DataRec
    fprintf(fpout,"%4u",DataRec
    fprintf(fpout,"%6u",DataRec
    fprintf(fpout,"\n");
    fclose(fpin);
    fclose(fpout);
    return 0;

  • High CPU usage when playing flv files with VideoDisplay

    Hi all,
    Now i develop a project with VideoDisplay, my problem is when i play f4v file, my CPU usage is very high.., I also play the same file with Adobe Media Player, the problem is still exist.
    Can anybody help me ~? thanks~,and sorry for my poor english~

    I'm pretty sure one reason is that Flash "watches" the video so it can sync up the frames with other animations you might want to overlay.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Calling an external C function from a C file in JNI

    Hello,
    I am trying to call an external C function, from a C file which is being called by a Java file. I am getting an unresolved symbol error. I have tried many things like, making the external C function in the format of JNI, etc, etc. It is still not working. I think it has something to do with linking the two C files. If anyone can please answer this, it would greatly help me. here is the code:
    HelloWorld.c:
    #include <jni.h>
    #include <stdio.h>
    #include "MyOldHello.h"
    #include "HelloWorld.h"
    JNIEXPORT void JNICALL
    Java_HelloWorld_print(JNIEnv *env, jobject obj)
         helloPrint();
         return;
    HelloWorld.java:
    class HelloWorld
         private native void print();
         public static void main(String[] args)
              new HelloWorld().print();
         static
              System.loadLibrary("HelloWorld");
              System.loadLibrary("MyOldHello");
    MyOldHello.c:
    #include <jni.h>
    #include <stdio.h>
    #include "MyOldHello.h"
    void helloPrint()
         printf("\nHello World!\n");
    MyOldHello.h:
    void helloPrint();
    Now i use the Visual C++ command prompt to compile this by saying:
    javac HelloWorld.java
    javah -jni HelloWorld
    cl -Ic:\Java\jdk1.6.0_20\include -Ic:\Java\jdk1.6.0_20\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll
    and now it gives me the error saying that there is an unresolved external symbol, which is the call to helloPrint in the file HelloWorld.
    If anyone knows how to solve this, or how to call external C functions from a C file that is being called from a Java file using JNI, please respond.
    Thanks
    Nick

    Hi,
    In your post on velocity review, you did not compile MyOldHello.c. You compiled a C file that included the header file for it and called a method defined in the header. The linker is never going to be able to find the code for this if you do not include the object file for this.
    Try this. You will also have to add in any JNI libraries you need to link against but I am sure you could work that out.
    cl /c MyOldHello.c
    cl /c -Ic:\Java\jdk1.6.0_20\include -Ic:\Java\jdk1.6.0_20\include\win32 -MD HelloWorld.c
    cl /LD MyOldHello.obj HelloWorld.obj /FeHelloWorld.dll
    [http://msdn.microsoft.com/en-us/library/f35ctcxw(VS.80).aspx]
    Cheers,
    Shane

  • EXCEPTION_FLT_STACK_CHECK in jre1.6.0_01 with JNI

    I have developed an application to manage a note acceptor. The manufacturer provided me a dll to communicate the device but my application is written in Java, so I developed the corresponding JNI to send the commands and obtain the answers.
    On the other hand, the dll sends some events to indicate the status of the device, so I developed the corresponding inverse JNI to allow the Java application to do the corresponding operations when an event occurs.
    If I use j2sdk1.4.2_05 I have no problem, but with jre1.6.0_01 application crashes and I obtain a file with the information bellow, even when events from C arrive to Java. Any idea?
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x0097ce69, pid=2964, tid=3168
    # Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode)
    # Problematic frame:
    # v ~RuntimeStub::resolve_opt_virtual_call
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x0b4e4800): JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@1b59919" [_thread_in_Java, id=3168]
    siginfo: ExceptionCode=0xc0000092, ExceptionInformation=0x00000000 0x1bf6ec24
    Registers:
    EAX=0x06b33dc0, EBX=0x06b33dc0, ECX=0x02a39810, EDX=0x02ed16d0
    ESP=0x1bf6ebb8, EBP=0x1bf6ecc8, ESI=0x06ab0848, EDI=0x00b0d6a0
    EIP=0x0097ce69, EFLAGS=0x00010216
    Top of Stack: (sp=0x1bf6ebb8)
    0x1bf6ebb8: ffff1372 ffff0000 ffffffff 0095b55f
    0x1bf6ebc8: 00c7001b 1bf6f6c4 ffff0023 6d937fbe
    0x1bf6ebd8: 00000000 085e0000 085e0000 1bc00000
    0x1bf6ebe8: 0b419400 0000085e 6788943c 0001003f
    0x1bf6ebf8: 9b000000 0b3fa308 1ba1eecc eed8eed0
    0x1bf6ec08: 00001ba1 0732003f 00000000 c0000000
    0x1bf6ec18: 00004000 00000000 3ffec000 0b486f6c
    0x1bf6ec28: 00000005 02a394c8 02a395e0 6d7d7e75
    Instructions: (pc=0x0097ce69)
    0x0097ce59: 00 00 83 ec 6c dd 34 24 9b dd 24 24 dd 5c 24 6c
    0x0097ce69: dd 5c 24 74 dd 5c 24 7c dd 9c 24 84 00 00 00 dd
    Stack: [0x1bf20000,0x1bf70000), sp=0x1bf6ebb8, free space=314k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    v ~RuntimeStub::resolve_opt_virtual_call
    J java.net.URL.<init>(Ljava/net/URL;Ljava/lang/String;)V
    j sun.misc.URLClassPath$FileLoader.getResource(Ljava/lang/String;Z)Lsun/misc/Resource;+10
    J sun.misc.URLClassPath.getResource(Ljava/lang/String;Z)Lsun/misc/Resource;
    j java.net.URLClassLoader$1.run()Ljava/lang/Object;+26
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x0ab07800 JavaThread "Thread-6" [_thread_in_native, id=3288]
    0x0af02400 JavaThread "StatusEventQueue" [_thread_blocked, id=2676]
    0x0ab04c00 JavaThread "OpEventQueue" [_thread_blocked, id=340]
    0x0b4d3400 JavaThread "TimerQueue" daemon [_thread_blocked, id=2728]
    0x0b497800 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@169dd64" [_thread_blocked, id=1064]
    0x0b4c6400 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@ee20fe" [_thread_blocked, id=4052]
    0x0b4acc00 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@75c78d" [_thread_blocked, id=3452]
    0x0b486000 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@650646" [_thread_blocked, id=3196]
    =>0x0b4e4800 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@1b59919" [_thread_in_Java, id=3168]
    0x0b48f400 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@126ba64" [_thread_blocked, id=1576]
    0x0b4a3400 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@407166" [_thread_blocked, id=1648]
    0x0b4ad400 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@1e4905a" [_thread_blocked, id=3392]
    0x0b498800 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@d402dd" [_thread_blocked, id=4056]
    0x0b4c7400 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@1e3a0ec" [_thread_blocked, id=1772]
    0x0b48d400 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@1e9d9b1" [_thread_blocked, id=2700]
    0x0b491400 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@509df8" [_thread_blocked, id=2576]
    0x0b4b1400 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@10e1513" [_thread_blocked, id=1448]
    0x0b4b0800 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@93c4f1" [_thread_blocked, id=2548]
    0x0b4ae400 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@1dbb27d" [_thread_blocked, id=2212]
    0x0b4b7800 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@705d28" [_thread_blocked, id=2236]
    0x0b4b3c00 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@72d873" [_thread_blocked, id=2876]
    0x0b46c400 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@18782a7" [_thread_blocked, id=1904]
    0x0b447c00 JavaThread "Thread-4" [_thread_blocked, id=3364]
    0x0b437400 JavaThread "Repository Writer of FileDictionary" [_thread_blocked, id=2672]
    0x0b43b400 JavaThread "com.jxfs.forum.repository.KeyChangeDispatcher@1b11b79" [_thread_blocked, id=2264]
    0x003f7800 JavaThread "DestroyJavaVM" [_thread_blocked, id=2956]
    0x0b442800 JavaThread "com.jxfs.general.JxfsDeviceManager$StatusDispatcher@1682a53" [_thread_blocked, id=164]
    0x0b42bc00 JavaThread "com.jxfs.general.JxfsDeviceManager$KeyValueChangeDispatcher@dac21" [_thread_blocked, id=2248]
    0x0b40f800 JavaThread "com.jxfs.general.JxfsLogger$DeliverMsgs@9b688e" [_thread_blocked, id=1268]
    0x0ae7a800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=2156]
    0x0ae85400 JavaThread "AWT-Windows" daemon [_thread_in_native, id=208]
    0x0ae84800 JavaThread "AWT-Shutdown" [_thread_blocked, id=2712]
    0x0ab23000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2796]
    0x0aafe800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3968]
    0x0aaf9c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2820]
    0x0aaf8800 JavaThread "Attach Listener" daemon [_thread_blocked, id=2244]
    0x0aaf7c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2808]
    0x0aae8000 JavaThread "Finalizer" daemon [_thread_blocked, id=2800]
    0x0aae3c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=2944]
    Other Threads:
    0x0aae0800 VMThread [id=2908]
    0x0ab19400 WatcherThread [id=2812]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 960K, used 467K [0x029d0000, 0x02ad0000, 0x02eb0000)
    eden
    [error occurred during error reporting, step 190, id 0xc0000092]
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\JVM\jdk1.6.0\bin\javaw.exe
    0x7c910000 - 0x7c9c6000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c901000      C:\WINDOWS\system32\kernel32.dll
    0x77da0000 - 0x77e4c000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e50000 - 0x77ee1000      C:\WINDOWS\system32\RPCRT4.dll
    0x7e390000 - 0x7e420000      C:\WINDOWS\system32\USER32.dll
    0x77ef0000 - 0x77f37000      C:\WINDOWS\system32\GDI32.dll
    0x76340000 - 0x7635d000      C:\WINDOWS\system32\IMM32.DLL
    0x62e30000 - 0x62e39000      C:\WINDOWS\system32\LPK.DLL
    0x74d20000 - 0x74d8b000      C:\WINDOWS\system32\USP10.dll
    0x77be0000 - 0x77c38000      C:\WINDOWS\system32\msvcrt.dll
    0x7c340000 - 0x7c396000      C:\JVM\jdk1.6.0\jre\bin\msvcr71.dll
    0x6d7c0000 - 0x6da07000      C:\JVM\jdk1.6.0\jre\bin\client\jvm.dll
    0x76b00000 - 0x76b2e000      C:\WINDOWS\system32\WINMM.dll
    0x6d310000 - 0x6d318000      C:\JVM\jdk1.6.0\jre\bin\hpi.dll
    0x76bb0000 - 0x76bbb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d770000 - 0x6d77c000      C:\JVM\jdk1.6.0\jre\bin\verify.dll
    0x6d3b0000 - 0x6d3cf000      C:\JVM\jdk1.6.0\jre\bin\java.dll
    0x6d7b0000 - 0x6d7bf000      C:\JVM\jdk1.6.0\jre\bin\zip.dll
    0x6d000000 - 0x6d1c3000      C:\JVM\jdk1.6.0\jre\bin\awt.dll
    0x72f80000 - 0x72fa6000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x774b0000 - 0x775ed000      C:\WINDOWS\system32\ole32.dll
    0x5b150000 - 0x5b188000      C:\WINDOWS\system32\uxtheme.dll
    0x736e0000 - 0x73729000      C:\WINDOWS\system32\ddraw.dll
    0x73b40000 - 0x73b46000      C:\WINDOWS\system32\DCIMAN32.dll
    0x746b0000 - 0x746fb000      C:\WINDOWS\system32\MSCTF.dll
    0x75160000 - 0x7518e000      C:\WINDOWS\system32\msctfime.ime
    0x7c9d0000 - 0x7d1ef000      C:\WINDOWS\system32\shell32.dll
    0x77f40000 - 0x77fb6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x773a0000 - 0x774a3000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
    0x58c30000 - 0x58cca000      C:\WINDOWS\system32\comctl32.dll
    0x6d2b0000 - 0x6d303000      C:\JVM\jdk1.6.0\jre\bin\fontmanager.dll
    0x6d570000 - 0x6d583000      C:\JVM\jdk1.6.0\jre\bin\net.dll
    0x71a30000 - 0x71a47000      C:\WINDOWS\system32\WS2_32.dll
    0x71a20000 - 0x71a28000      C:\WINDOWS\system32\WS2HELP.dll
    0x6d590000 - 0x6d599000      C:\JVM\jdk1.6.0\jre\bin\nio.dll
    0x6d450000 - 0x6d474000      C:\JVM\jdk1.6.0\jre\bin\jpeg.dll
    0x0b780000 - 0x0b7a3000      C:\Archivos de programa\Babylon\Babylon-Pro\CAPTLIB.DLL
    0x770f0000 - 0x7717c000      C:\WINDOWS\system32\OLEAUT32.dll
    0x74c10000 - 0x74c3c000      C:\WINDOWS\system32\OLEACC.dll
    0x76030000 - 0x76095000      C:\WINDOWS\system32\MSVCP60.dll
    0x1b9d0000 - 0x1ba0f000      C:\WINDOWS\system32\BNA5.dll
    0x1c4b0000 - 0x1c54d000      C:\WINDOWS\system32\BNA5Ctl.dll
    0x5f1f0000 - 0x5f207000      C:\WINDOWS\system32\olepro32.dll
    VM Arguments:
    jvm_args: -DGlobalHelp=DtgHelp.hs
    java_command: com.dtg.jxfs.tools.test.JxfsTest C:\Views\nperales_JXFS21P\JXFS_System\JXFS\src\jxfs\..\..\..\..\GLOBALDS\ C:\Views\nperales_JXFS21P\JXFS_System\JXFS\src\jxfs\..\..\..\..\GLOBALDS\Tester\Test.properties
    Launcher Type: SUN_STANDARD
    Environment Variables:
    CLASSPATH=C:\Archivos de programa\Java\jre1.5.0_05\lib\ext\QTJava.zip;C:\Archivos de programa\Rational\ClearQuest\cqjni.jar
    PATH=C:\Archivos de programa\Archivos comunes\Unisys\ImageSecurity\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Archivos de programa\UltraEdit;C:\Archivos de programa\QuickTime\QTSystem\;C:\Archivos de programa\Rational\ClearCase\bin;C:\Archivos de programa\Rational\common
    USERNAME=nperales
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 1562696k(619700k free), swap 2970100k(2239440k free)
    vm_info: Java HotSpot(TM) Client VM (1.6.0-b105) for windows-x86, built on Nov 29 2006 00:48:48 by "java_re" with unknown MS VC++:1310

    I have developed an application to manage a note acceptor. The manufacturer provided me a dll to communicate the device but my application is written in Java, so I developed the corresponding JNI to send the commands and obtain the answers.
    On the other hand, the dll sends some events to indicate the status of the device, so I developed the corresponding inverse JNI to allow the Java application to do the corresponding operations when an event occurs.
    If I use j2sdk1.4.2_05 I have no problem, but with jre1.6.0_01 application crashes and I obtain a file with the information bellow, even when events from C arrive to Java. Any idea?
    # An unexpected error has been detected by Java Runtime Environment:
    # EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x0097ce69, pid=2964, tid=3168
    # Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode)
    # Problematic frame:
    # v ~RuntimeStub::resolve_opt_virtual_call
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    --------------- T H R E A D ---------------
    Current thread (0x0b4e4800): JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@1b59919" [_thread_in_Java, id=3168]
    siginfo: ExceptionCode=0xc0000092, ExceptionInformation=0x00000000 0x1bf6ec24
    Registers:
    EAX=0x06b33dc0, EBX=0x06b33dc0, ECX=0x02a39810, EDX=0x02ed16d0
    ESP=0x1bf6ebb8, EBP=0x1bf6ecc8, ESI=0x06ab0848, EDI=0x00b0d6a0
    EIP=0x0097ce69, EFLAGS=0x00010216
    Top of Stack: (sp=0x1bf6ebb8)
    0x1bf6ebb8: ffff1372 ffff0000 ffffffff 0095b55f
    0x1bf6ebc8: 00c7001b 1bf6f6c4 ffff0023 6d937fbe
    0x1bf6ebd8: 00000000 085e0000 085e0000 1bc00000
    0x1bf6ebe8: 0b419400 0000085e 6788943c 0001003f
    0x1bf6ebf8: 9b000000 0b3fa308 1ba1eecc eed8eed0
    0x1bf6ec08: 00001ba1 0732003f 00000000 c0000000
    0x1bf6ec18: 00004000 00000000 3ffec000 0b486f6c
    0x1bf6ec28: 00000005 02a394c8 02a395e0 6d7d7e75
    Instructions: (pc=0x0097ce69)
    0x0097ce59: 00 00 83 ec 6c dd 34 24 9b dd 24 24 dd 5c 24 6c
    0x0097ce69: dd 5c 24 74 dd 5c 24 7c dd 9c 24 84 00 00 00 dd
    Stack: [0x1bf20000,0x1bf70000), sp=0x1bf6ebb8, free space=314k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    v ~RuntimeStub::resolve_opt_virtual_call
    J java.net.URL.<init>(Ljava/net/URL;Ljava/lang/String;)V
    j sun.misc.URLClassPath$FileLoader.getResource(Ljava/lang/String;Z)Lsun/misc/Resource;+10
    J sun.misc.URLClassPath.getResource(Ljava/lang/String;Z)Lsun/misc/Resource;
    j java.net.URLClassLoader$1.run()Ljava/lang/Object;+26
    v ~StubRoutines::call_stub
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x0ab07800 JavaThread "Thread-6" [_thread_in_native, id=3288]
    0x0af02400 JavaThread "StatusEventQueue" [_thread_blocked, id=2676]
    0x0ab04c00 JavaThread "OpEventQueue" [_thread_blocked, id=340]
    0x0b4d3400 JavaThread "TimerQueue" daemon [_thread_blocked, id=2728]
    0x0b497800 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@169dd64" [_thread_blocked, id=1064]
    0x0b4c6400 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@ee20fe" [_thread_blocked, id=4052]
    0x0b4acc00 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@75c78d" [_thread_blocked, id=3452]
    0x0b486000 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@650646" [_thread_blocked, id=3196]
    =>0x0b4e4800 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@1b59919" [_thread_in_Java, id=3168]
    0x0b48f400 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@126ba64" [_thread_blocked, id=1576]
    0x0b4a3400 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@407166" [_thread_blocked, id=1648]
    0x0b4ad400 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@1e4905a" [_thread_blocked, id=3392]
    0x0b498800 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@d402dd" [_thread_blocked, id=4056]
    0x0b4c7400 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@1e3a0ec" [_thread_blocked, id=1772]
    0x0b48d400 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@1e9d9b1" [_thread_blocked, id=2700]
    0x0b491400 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@509df8" [_thread_blocked, id=2576]
    0x0b4b1400 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@10e1513" [_thread_blocked, id=1448]
    0x0b4b0800 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@93c4f1" [_thread_blocked, id=2548]
    0x0b4ae400 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@1dbb27d" [_thread_blocked, id=2212]
    0x0b4b7800 JavaThread "Support:EventQueue(listeners=Vector@1,events=Vector@1,eventBufferSize=1000)@705d28" [_thread_blocked, id=2236]
    0x0b4b3c00 JavaThread "QueueControl(mode=1,suspended=false,jobs=0,regControls=[],claimOwner[])@72d873" [_thread_blocked, id=2876]
    0x0b46c400 JavaThread "com.jxfs.general.JxfsDeviceManager$DeviceKeyValueChangeDispatcher@18782a7" [_thread_blocked, id=1904]
    0x0b447c00 JavaThread "Thread-4" [_thread_blocked, id=3364]
    0x0b437400 JavaThread "Repository Writer of FileDictionary" [_thread_blocked, id=2672]
    0x0b43b400 JavaThread "com.jxfs.forum.repository.KeyChangeDispatcher@1b11b79" [_thread_blocked, id=2264]
    0x003f7800 JavaThread "DestroyJavaVM" [_thread_blocked, id=2956]
    0x0b442800 JavaThread "com.jxfs.general.JxfsDeviceManager$StatusDispatcher@1682a53" [_thread_blocked, id=164]
    0x0b42bc00 JavaThread "com.jxfs.general.JxfsDeviceManager$KeyValueChangeDispatcher@dac21" [_thread_blocked, id=2248]
    0x0b40f800 JavaThread "com.jxfs.general.JxfsLogger$DeliverMsgs@9b688e" [_thread_blocked, id=1268]
    0x0ae7a800 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=2156]
    0x0ae85400 JavaThread "AWT-Windows" daemon [_thread_in_native, id=208]
    0x0ae84800 JavaThread "AWT-Shutdown" [_thread_blocked, id=2712]
    0x0ab23000 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2796]
    0x0aafe800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3968]
    0x0aaf9c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2820]
    0x0aaf8800 JavaThread "Attach Listener" daemon [_thread_blocked, id=2244]
    0x0aaf7c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2808]
    0x0aae8000 JavaThread "Finalizer" daemon [_thread_blocked, id=2800]
    0x0aae3c00 JavaThread "Reference Handler" daemon [_thread_blocked, id=2944]
    Other Threads:
    0x0aae0800 VMThread [id=2908]
    0x0ab19400 WatcherThread [id=2812]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 960K, used 467K [0x029d0000, 0x02ad0000, 0x02eb0000)
    eden
    [error occurred during error reporting, step 190, id 0xc0000092]
    Dynamic libraries:
    0x00400000 - 0x00423000      C:\JVM\jdk1.6.0\bin\javaw.exe
    0x7c910000 - 0x7c9c6000      C:\WINDOWS\system32\ntdll.dll
    0x7c800000 - 0x7c901000      C:\WINDOWS\system32\kernel32.dll
    0x77da0000 - 0x77e4c000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77e50000 - 0x77ee1000      C:\WINDOWS\system32\RPCRT4.dll
    0x7e390000 - 0x7e420000      C:\WINDOWS\system32\USER32.dll
    0x77ef0000 - 0x77f37000      C:\WINDOWS\system32\GDI32.dll
    0x76340000 - 0x7635d000      C:\WINDOWS\system32\IMM32.DLL
    0x62e30000 - 0x62e39000      C:\WINDOWS\system32\LPK.DLL
    0x74d20000 - 0x74d8b000      C:\WINDOWS\system32\USP10.dll
    0x77be0000 - 0x77c38000      C:\WINDOWS\system32\msvcrt.dll
    0x7c340000 - 0x7c396000      C:\JVM\jdk1.6.0\jre\bin\msvcr71.dll
    0x6d7c0000 - 0x6da07000      C:\JVM\jdk1.6.0\jre\bin\client\jvm.dll
    0x76b00000 - 0x76b2e000      C:\WINDOWS\system32\WINMM.dll
    0x6d310000 - 0x6d318000      C:\JVM\jdk1.6.0\jre\bin\hpi.dll
    0x76bb0000 - 0x76bbb000      C:\WINDOWS\system32\PSAPI.DLL
    0x6d770000 - 0x6d77c000      C:\JVM\jdk1.6.0\jre\bin\verify.dll
    0x6d3b0000 - 0x6d3cf000      C:\JVM\jdk1.6.0\jre\bin\java.dll
    0x6d7b0000 - 0x6d7bf000      C:\JVM\jdk1.6.0\jre\bin\zip.dll
    0x6d000000 - 0x6d1c3000      C:\JVM\jdk1.6.0\jre\bin\awt.dll
    0x72f80000 - 0x72fa6000      C:\WINDOWS\system32\WINSPOOL.DRV
    0x774b0000 - 0x775ed000      C:\WINDOWS\system32\ole32.dll
    0x5b150000 - 0x5b188000      C:\WINDOWS\system32\uxtheme.dll
    0x736e0000 - 0x73729000      C:\WINDOWS\system32\ddraw.dll
    0x73b40000 - 0x73b46000      C:\WINDOWS\system32\DCIMAN32.dll
    0x746b0000 - 0x746fb000      C:\WINDOWS\system32\MSCTF.dll
    0x75160000 - 0x7518e000      C:\WINDOWS\system32\msctfime.ime
    0x7c9d0000 - 0x7d1ef000      C:\WINDOWS\system32\shell32.dll
    0x77f40000 - 0x77fb6000      C:\WINDOWS\system32\SHLWAPI.dll
    0x773a0000 - 0x774a3000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll
    0x58c30000 - 0x58cca000      C:\WINDOWS\system32\comctl32.dll
    0x6d2b0000 - 0x6d303000      C:\JVM\jdk1.6.0\jre\bin\fontmanager.dll
    0x6d570000 - 0x6d583000      C:\JVM\jdk1.6.0\jre\bin\net.dll
    0x71a30000 - 0x71a47000      C:\WINDOWS\system32\WS2_32.dll
    0x71a20000 - 0x71a28000      C:\WINDOWS\system32\WS2HELP.dll
    0x6d590000 - 0x6d599000      C:\JVM\jdk1.6.0\jre\bin\nio.dll
    0x6d450000 - 0x6d474000      C:\JVM\jdk1.6.0\jre\bin\jpeg.dll
    0x0b780000 - 0x0b7a3000      C:\Archivos de programa\Babylon\Babylon-Pro\CAPTLIB.DLL
    0x770f0000 - 0x7717c000      C:\WINDOWS\system32\OLEAUT32.dll
    0x74c10000 - 0x74c3c000      C:\WINDOWS\system32\OLEACC.dll
    0x76030000 - 0x76095000      C:\WINDOWS\system32\MSVCP60.dll
    0x1b9d0000 - 0x1ba0f000      C:\WINDOWS\system32\BNA5.dll
    0x1c4b0000 - 0x1c54d000      C:\WINDOWS\system32\BNA5Ctl.dll
    0x5f1f0000 - 0x5f207000      C:\WINDOWS\system32\olepro32.dll
    VM Arguments:
    jvm_args: -DGlobalHelp=DtgHelp.hs
    java_command: com.dtg.jxfs.tools.test.JxfsTest C:\Views\nperales_JXFS21P\JXFS_System\JXFS\src\jxfs\..\..\..\..\GLOBALDS\ C:\Views\nperales_JXFS21P\JXFS_System\JXFS\src\jxfs\..\..\..\..\GLOBALDS\Tester\Test.properties
    Launcher Type: SUN_STANDARD
    Environment Variables:
    CLASSPATH=C:\Archivos de programa\Java\jre1.5.0_05\lib\ext\QTJava.zip;C:\Archivos de programa\Rational\ClearQuest\cqjni.jar
    PATH=C:\Archivos de programa\Archivos comunes\Unisys\ImageSecurity\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Archivos de programa\UltraEdit;C:\Archivos de programa\QuickTime\QTSystem\;C:\Archivos de programa\Rational\ClearCase\bin;C:\Archivos de programa\Rational\common
    USERNAME=nperales
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows XP Build 2600 Service Pack 2
    CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
    Memory: 4k page, physical 1562696k(619700k free), swap 2970100k(2239440k free)
    vm_info: Java HotSpot(TM) Client VM (1.6.0-b105) for windows-x86, built on Nov 29 2006 00:48:48 by "java_re" with unknown MS VC++:1310

  • PC/SC with JNI vs. javax.smartcardio

    Hi,
    for programming card terminals (USB tag readers) the PC/SC was used with JNI. Since the Java Smartcard I/O API (javax.smartcardio, JSR 268) was introduces in 1.6 it makes the JNI obsolete right?
    So there is no need for jpcsc and similar?
    Thanks
    STeN
    Edited by: stenlik on Jun 8, 2011 8:39 PM

    smartcardio uses JNI to access the PC/SC layer. It is built into the JDK so you do not have to distribute the JAR/DLL files any more as they are already delivered. jpcsc still has it's place but as you mentioned it is not required any more (unless your JDK does not have smartcardio).
    Cheers,
    Shane

  • Awkward problems with JNI on J2SE 5.0

    I'm experiencing a strange problem with JNI and I hope someone can help me out.I've installed Cygwin, MinGW and then the CDT plug-in for Eclipse C/C++ development. This means I've used the MinGW make utility. It successfully creates the DLL file, but for some awkward reason, function www_tutorial_jni_HelloWorld_displayHelloWorld cannot be found (UnsatisfiedLinkError: displayHelloWorld).
    The Java class looks like this:
    package www.tutorial.jni;
    public class HelloWorld {
        public native void displayHelloWorld();
        static {
            System.loadLibrary("hello");
        public static final void main(String[] args) {
             try {
                  HelloWorld hw = new HelloWorld();
                  hw.displayHelloWorld();
             } catch (Exception e) {
                  System.out.println(e.toString());
    }The header that was generated by javah.exe (version 1.5.0_01) looks like this:
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class www_tutorial_jni_HelloWorld */
    #ifndef _Included_www_tutorial_jni_HelloWorld
    #define _Included_www_tutorial_jni_HelloWorld
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     www_tutorial_jni_HelloWorld
    * Method:    displayHelloWorld
    * Signature: ()V
    JNIEXPORT void JNICALL
    Java_www_tutorial_jni_HelloWorld_displayHelloWorld
      (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endifThe C++ implementation looks like this:
    #include <jni.h>
    #include "www_tutorial_jni_HelloWorld.h"
    #include <stdio.h>
    JNIEXPORT void JNICALL
    Java_www_tutorial_jni_HelloWorld_displayHelloWorld(JNIEnv
    *env, jobject obj)
        printf("Hello world!\n");
        return;
    }I've made sure that the fully qualified name of the implementation function is identical to the one in the header. I don't understand why I still get the error; especially since checking the DLL reveals that a function called "Java_www_tutorial_jni_HelloWorld_displayHelloWorld" exists.
    Could someone try and produce a successfull DLL/SO from the C++ code and then try and run the Java part on a 5.0 version of Java? I'm really curious as to what on Earth is going on...

    ... Otherwise, I would have
    to add whatever directory I put my DLL into to the
    PATH variable.Not necessarily. I believe the "PATH" also implicitly includes the "current directory". I also think that most JNI users put their DLL in a directory from which they also launch java (so it's in the current directory).
    >
    ... a java.library.path set.
    If I don't explicitly set a Java library path,
    Eclipse can't even find the DLL. I'm beginning to
    believe that Eclipse somehow screws up running Java
    programs with native code...I don't know about that... Probably just something extra you have to do with your Eclipse project so that it can find the DLL.
    But like I said, I don't really know - just trying to throw out ideas, small as they may be.

  • Please help! I defragged my hard drive and now Illustrator CS6 is trying to open all of my complex Illustrator files with a "Text Import Options" box as if they are text files, and they are not opening!

    Please help! Illustrator CS6 started trying to open all of my complex.ai files with a "Text Import Options" box as if they were text files, and they are not opening!  Help!

    Hi Monika,
    I have spent the last two or three days trying to do what you suggested.  I uninstalled Adobe 6 from Windows.  Some files that CS6 placed on my system during installation remained, including fonts and .dll files.
    I had to abandon the Cleaner Tool you suggested because in one screen it allowed me to specify removing CS6 only, but on the following screen it only gave on option to remove ALL Adobe programs.  I could not do that because I didn't have the serial number handy for CS3 in case I want to reinstall it at some point.
    I tried to get technical help with the Cleaner Tool problem but no definitive help was available, so I reinstalled CS6 again without having the benefit of the Cleaner Tool.  I tried to get the serial number for CS3 so I could use the Cleaner Tool but spent 2 wasted hours in chat.  Even though I had a customer number, order number, order date, place of purchase, the email address used AND 16 digits of the serial number, in two hours the agent couldn't give me the serial number.  After two hours I had nothing but instructions to wait another 20 minutes for a case number.
    Illustrator CS6 is still trying to open some backups as Text and otherNone of the problems have been fixed.  I have tried to open/use the .ai files in CS6 installed on another system and am getting the same result, so I don't think the software was damaged by the cleaner.  The hard drive cleaner is well-known and I've run it many times without any problem to previous versions of Illustrator or any other programs.
    When I ordered, the sale rep promised good technical support and gave me an 800 number, but after I paid the $2000, I learned that the 800 number she gave me doesn't support CS6 and hangs up on me.  Adobe doesn't call it a current product even though they just sold it to me about 3 weeks ago.
    Would appreciate any help you experts can offer.  If I can't solve this, the last backup I can use was from June and I will have lost HUNDREDS of hours of work and assets that I cannot replace.
    Exhausted and still desperately in need of help...

  • [Help]Playing MP3 files with Juk have to wait for 1 hr to hear voice

    I am not sure how long should wait, but difinately longer than 10min. If you are playing a playlist, you have to wait a long time for next song...
    Observations:
    1. You can hear voice after all, that means the hardware and codec is working properly.
    2. You can play the mp3 file with smplayer without difficulty. that means the filesystem/storage hardware should'nt be problematic.
    3. When waiting for playing songs, the CPU usage of Juk is remaining on about 3%. I believe it is a reasonable value and does not indicating any problem of the program.
    Have anybody here got this problem before? Help!

    in case your phonon backend is gstreamer, change it to xine. that's what is recommended by amarok devs.

Maybe you are looking for

  • PS3 and Internet Sharing

    Hello all, I'm having a strange problem with the internet sharing in general... but basically I have to restart the internet sharing to allow my PS3 to connect. My building has a wifi access point that I connect to via my macbook internal airport - w

  • How do I get iTunes to allow me to restore iPhone files from backup?

    My iPhone 5 was previously backed up via iTunes to my laptop running OS 10.8.4.  However, the File | Devices | Restore option in iTunes is grayed out (AAARGH!).  Moreover, I cannot figure out where the backup file is stored on my laptop.  I need to p

  • Default AR Invoice Date

    I am posting transaction for 2011 and its January 2012 already can i set a specific default posting dates, due dates to the AR Invoice Module?

  • Usage Rights lost - important info

    Hello! Today I updated a test system with a new Reader Extension certificate cause the old one had expired. After installing the new one via adminui I tried to apply usage rights but always got the message by Reader that the document had rights which

  • Reading constants in bpel

    What is the best strategy of reading the constants that are used in Expressions in bpel? Can we read them from some kind of property files? Is there any example prj which shows how to read propery files in bpel?