Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
An application needs to load a library before it starts to run, how to code??
An application needs to load a library before it starts to run, how to code??
✍: Guest
One option is to use a static block to load a library before anything is called. For example,
class Test {
static {
System.loadLibrary("path-to-library-file");
}
....
}
When you call new Test(), the static block will be called first before any initialization happens. Note that the static block position may matter.
2012-05-18, 2870👍, 0💬
Popular Posts:
How Many Tags Are Defined in HTML 4.01? There are 77 tags defined in HTML 4.01: a abbr acronym addre...
What’s the difference between Unit testing, Assembly testing and Regression testing? Unit testing is...
interview.FYIcenter.com offers a collections of interview questions and answers for software and Web...
What are the five levels in CMMI? There are five levels of the CMM. According to the SEI, Level 1 – ...
How can we implement singleton pattern in .NET? Singleton pattern mainly focuses on having one and o...