The most common way to do this is to use org.osgi.framework.Bundle.getEntry(String) and then org.eclipse.core.runtime.FileLocator.toFileURL(URL) . getEntry("/jni_lib/") will return a URL pointing to the folder, and FileLocator will expand the requested binding URL to the local drive if necessary. This works if you use functions or not, if plugins are exported to disk or not, etc.
@vanaprogeja suggested the second most common option and needs functions to work (which is perfectly acceptable)
source share