Java Tutorial/Development/JNI — различия между версиями

Материал из Java эксперт
Перейти к: навигация, поиск
м (1 версия)
 
м (1 версия)
 
(нет различий)

Текущая версия на 18:30, 31 мая 2010

If the DLL is in the CLASSPATH then you don"t need to specify a PATH.

   <source lang="java">

Runtime.getRuntime().load("d:/directoryX/subDirY/MyDll.dll");</source>





Load a DLL

   <source lang="java">

System.loadLibrary("d:\\directoryX\\subDirY\\MyDll.dll")</source>





Specify through the JVM command line the location where to find the JNI DLL to be loaded

   <source lang="java">

java -Djava.library.path=c:/JNI</source>