External Interfaces Previous page   Next Page

Locating Native Method Libraries

Java classes can dynamically load native methods using the Java method java.lang.System.loadLibrary("LibFile"). In order for the JVM to locate the specified library file, the directory containing it must be on the Java Library Path. This path is established when MATLAB launches the JVM at startup, and is based on the contents of the file

(where $matlab is the MATLAB root directory represented by the MATLAB keyword matlabroot).

You can augment the search path for native method libraries by editing the librarypath.txt file. Follow these guidelines when editing this file:


Previous page  Simplifying Java Class Names Creating and Using Java Objects Next page

© 1994-2005 The MathWorks, Inc.