Native Methods and Libraries - Java
What are Native Methods and Libraries? Native methods and native libraries are bits of platform-specific executable code (written in languages such as C or C++) contained in libraries or DLLs. Inside your Java applications you can gain access to the functions inside those libraries, allowing you to create a sort of hybrid Java and native code application. Although using native methods can give you some extra benefits Java does not provide (such as faster execution or access to a large body of existing code), there are significant disadvantages in using native methods as well. Why Use Native Methods? Gaining access to special capabilities of your computer or operating system Needing the extra speed that native methods provide Needing access to a large body of existing code Disadvantages of Native Methods With a hybrid Java and native method program, however, you've given up that cross-platform capability. First of all, Java programs that use native methods cannot...