The JavaTM Tutorial

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Trail: Java Native Interface
Lesson: Writing a Java Program with Native Methods

## Set Your Library Path

> UNIX

>       % setenv LD_LIBRARY_PATH mylibrarypath

>   where mylibrarypath is the name of the directory that contains `libhello.so`.

> DOS shell (Windows 95/NT)
>   On Windows 95/NT, the `loadLibrary()` method searches for DLLs in the same manner as other language environments do.

> MacOS
>   The Java runtime searches the `JavaSoft Folder` in the `Extensions` folder in the `System Folder` for shared libraries. Create an alias to your shared library in the `JavaSoft Folder`.

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Copyright 1995-2004 Sun Microsystems, Inc. All rights reserved.