What is the difference between System.load() and System.loadLibrary() in java?
I want to load a library but I don’t want to add the path to environment variables.
Will any one of these help?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The difference is there in the API documentation.
System.loadLibrary(String libname)lets you load from the default path — The Java library path.The other
System.load(String filename)lets you load it from an absolute path, which you must specify as your filename.If you don’t want to mess with you
java.library.pathenvironment variable, you should useSystem.load()