[pre JDK1.2]
```System.loadLibrary("d:\\directoryX\\subDirY\\MyDll.dll")
```
In JDK1.2 (or better), if the DLL is in the CLASSPATH then you don't need to specify a PATH. If the DLL is not in the CLASSPATH then you need to specify the PATH.

```Runtime.getRuntime().load("d:/directoryX/subDirY/MyDll.dll");
```java -Djava.library.path=c:/temp JNIJavaHowTo