Menu

JNative class in CVS

Developers
Thubb
2008-02-17
2013-04-26
  • Thubb

    Thubb - 2008-02-17

    Marc,

    your recent changes to JNative class in CVS breaks the loading of the native dll for me:

    // This returns null for me!
    //InputStream in = JNative.class.getResourceAsStream("../../../lib-bin/" + DLL_NAME);
    // This is working for me!
    InputStream in = JNative.class.getResourceAsStream("/lib-bin/" + DLL_NAME);

    As I am using Windows this could be due to a OS problem. Could you please check if the above also works for you on i.e. Unix/Linux?

    Thubby

     
    • Marc DENTY

      Marc DENTY - 2008-02-17

      Thubby,

      This is really strange since it's working for me, but I did not tried to package JNative to a JAR file. Have you ?

      I have not tested it with Linux (I do not use it these days).
      I have recompile the Win32 DLL without debug informations (900 to 95 kB) and the new DLL is now compatible with JET JVM (and perhaps others).
      I have changed some code with float usage (isNaN() import method suppressed from JVM.DLL) but not tested it. If you can please do it.

      Best,

      --Marc

       
    • Thubb

      Thubb - 2008-02-17

      Yes, I packaged the dll into the jar-file and totally removed it from %WINDIR%\SYSTEM32 and it only works for me the way I posted before...

       
    • Thubb

      Thubb - 2008-02-17

      I think you have the dll somewhere else in your classpath or maybe %WINDIR%\SYSTEM32 that is potentially why the previous code worked for you. Try and remove the dll from classpath and %WINDIR%\SYSTEM32 and pack it to the jar file. For me only the above code works...

      Thubby

       
      • Marc DENTY

        Marc DENTY - 2008-02-17

        Well, I don't know.

        I use it at work and the project is in alpha state so nothing is packaged yet.
        At the end all will be packaged in JAR files and will run under Jetty.

        When you change the code the way you described, did you repackaged the DLL into the JAR ?
        Is the DLL be extracted from the JAR at runtime ?

        --Marc

         
    • Thubb

      Thubb - 2008-02-17

      Netbeans automatically packs the dll to the jar-file. And yes the dll gets unpacked with my code.

       

Log in to post a comment.