Title: Can isCOBOL access a DLL or .so that is in a JAR file?
Question:

Can I include DLLs and/or .so files in the same JAR file as my application? Will the application be able to call those DLLs or shared objects in the JAR file? If not, then what is the best way to distribute DLLs with my application if I want everything to be included in a single file?

Answer:

DLLs need to be located by Windows in specific places. Unfortunately, Windows does not look inside of JAR files.

Windows searches for DLLs in the following places:
  1. The directory from which the application loaded.
  2. The system directory.
  3. The 16-bit system directory.
  4. The Windows directory.
  5. The current directory.
  6. The directories that are listed in the PATH environment variable.
See Dynamic-Link Library Search Order on MSDN for more information.

Note that with isCOBOL the directory from which the application loaded is generally the JDK or JRE bin directory containing java.exe. If you execute your application with isrun.exe or iscrun.exe then the directory containing those executables is considered the directory from which the application is loaded.

The best way to distribute DLLs is to include them in a folder with your application and make sure that that folder is the current directory or is in PATH when the application executes.
Authored by: Veryant Support on Mon, Aug 31st, 2009 at 7:00 PM
This question has been viewed 6717 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=45

Powered by PHPKB Knowledge Base Software