This is a discussion on What are native methods? How do you use them? within the Java Programming forums, part of the Software Development category; What are native methods? How do you use them?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| What are native methods? How do you use them? |
|
#2
| |||
| |||
| The ability to write just one set of code in Java and have it run on every system with a Java run-time is one of Java's primary strengths.The ability to write just one set of code in Java and have it run on every system with a Java run-time is one of Java's primary strengths. But this platform independence has one key drawback: What do we do with the vast amount of existing code? The trick is to use the so-called native method interface. Writing native methods involves importing C code into your Java application. Seven steps to native method nirvana The steps to creating native methods are as follows: Write Java code Compile Java code Create C header (.h file) Create C stubs file Write C code Create shared code library (or DLL) Run application |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SQL Server Native Client | Sathish Kumar | Database Support | 1 | 08-22-2007 12:43 AM |
| How do I call the native API from Java? | oxygen | Java Programming | 2 | 08-06-2007 07:43 AM |
| What is Native Image Generator (Ngen.exe) in asp.net? | oxygen | ASP and ASP.NET Programming | 1 | 07-26-2007 03:06 AM |
| Simple Dynamic Native SQL - Oracle | Murali | Database Support | 0 | 07-19-2007 06:30 AM |
| How to Convert the MSIL to native code? | Archer | C and C++ Programming | 1 | 07-17-2007 01:50 AM |
Our Partners |