4 Replies Latest reply on Dec 21, 2006 12:06 PM by Siddhartha Subramanian

    location for DLL's

    Siddhartha Subramanian Newbie

      Hi

      I have a few DLL's that I need to be loaded into the JBoss Env for some codebase in my app to read in. I ahve tried everything from placing it in %JBOSS_HOME%/bin to setting the java.library.path (set it to the directory where the libraries exist.). I still get an unsatisfied link error for the DLL usage.

      Any pointers on where JBOSS deployment scanner looks for DLLS?

      TIA

        • 1. Re: location for DLL's
          Peter Johnson Master

          The JBoss deployment scanner does not look for DLLs. It is the JVM that needs to locate and load DLLs. The JVM uses the PATH environment variable to determine where to load DLLs from.

          • 2. Re: location for DLL's
            Siddhartha Subramanian Newbie

            well I tried the java.library.path setting to set to the location that the DLL;s are located, but still got the unsatisfied link error. Not sure of the intention of the -Djboss.native.load=true but tried that too but not sure where jboss looks for to get the DLL's from..I know it extracts to tmp/native from documentation but where it scans was not sure. From what you say it looks like it does not scan at all so why this property?

            • 3. Re: location for DLL's
              Peter Johnson Master

              The jboss.native.load and jboss.native.dir system properties come into play if you deploy an archive (such as a jar file) with an embedded native library. In other words, if I have foobar.jar which contains:

              org/stuff/Main.class
              org/stuff/Other.class
              other.dll

              then when JBoss deploys the jar, it will also load the DLL by first copying it to the jboss.native.dir directory and loading it from there.

              So you have two choices. If your Java code calls System.load(), then place your DLL in the PATH. If you expect JBoss to load your DLL, include it in your jar/sar/whatever file.

              Oh by the way, it appears that jboss.native.load defaults to true.

              • 4. Re: location for DLL's
                Siddhartha Subramanian Newbie

                yup setting it to PATH works. how different is java.library.path from PATH?