What is java.library.path , How to set in Eclipse IDE

java.library.path is a System property, which is used by Java programming language, mostly JVM, to search native libraries, required by project. Similar to PATH and Classpath environment variable, java.library.path also includes a list of directory. When Java code loads a native library (a library or executable written in language like C, C++ or native code) using System.loadLibrary("name of library") method, java.library.path is scanned for specified library. If JVM doesn't found requested native library, then it throw java.lang.UnsatisfiedLinkError: no native library in java.library.path. Now some one may argue that, why does Java program should depend on native library, doesn't this make a Java application platform dependent? Well, he would be right, but there are situations, where most of code is already written in native languages, and you are just writing some Java code on top of that. In those scenario, instead of rewriting whole stuff, you tend to use native libraries. Sometimes a third party JAR (written in Java) depends upon some native components as well. If you have been using Tibco RV messaging, then you might know that Java API for Tibco RV depends upon several dll files, and until those files are present in java.library.path, you can not run those Java program successfully. Since most of us, run Java program from Eclipse IDE, it's important to know How to set java.library.path in Eclipse. In this Java tutorial, I will show you couple of ways to set java.library.path in Eclipse IDE, you can follow similar steps in other IDE like Netbeans or IntelliJ to set java.library.path
Read more »

0 Response to "What is java.library.path , How to set in Eclipse IDE"

Poskan Komentar