Use the following Glassfish command to indicate the path where your own libraries are located:
asadmin set server.java-config.native-library-path-prefix=$NATIVE_LIBRARY_PATH
You can also set the location of your own library through the admin console. If you need the flexibility of moving / renaming libraries, you can use symbolic links.
What is the advantage of this in adding your own library through Eclipse to build a path?
The JVM must know the path of its own library. If you run the JVM from Eclipse (for example, testing a module using its own library), you will need to configure the path in Eclipse. However, if you run the JVM from Glassfish (using the Eclipse Glassfish Adapter), then Glassfish itself must be configured.
source share