Solved: java.lang.UnsatisfiedLinkError: no hello in java.library.path

When we were developing the JNI example as mentioned in our another post, “Java Native Interface ( JNI ) Example , Calling Native C functions from JAVA” we got an error “Exception in thread “main” java.lang.UnsatisfiedLinkError: no hello in java.library.path” as below,

Exception in thread "main" java.lang.UnsatisfiedLinkError: no hello in java.library.path
	at java.lang.ClassLoader.loadLibrary(
	at java.lang.Runtime.loadLibrary0(
	at java.lang.System.loadLibrary(
	at HelloWorld.<clinit>(
	at Main.main(

Solution :

This error can be solved by adding the PATH of the native shared library using LD_LIBRARY_PATH as,


execute this command from the directory where you are trying to execute the JNI example. i.e. the directory where you have created shared library OR you can replace $PWD with the complete path to directory with shared library.

Related :   How to develop first android Application/App in Android Studio ?

Now we can check the LD_LIBRARY_PATH as,


Now, if you execute the JNI application, you will not see the error.


Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded