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, 2512👍, 0💬
Popular Posts:
How To Display a Past Time in Days, Hours and Minutes? - MySQL FAQs - Managing Tables and Running Qu...
How To Analyze Tables with "mysqlcheck"? - MySQL FAQs - Administrator Tools for Managing MySQL Serve...
Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?...
What will be printed as the result of the operation below: main() { int x=20,y=35; x=y++ + x++; y= +...
What is XSLT? XSLT is a rule based language used to transform XML documents in to other file formats...