IT Community - Software Programming, Web Development and Technical Support

What are native methods? How do you use them?

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?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Java Programming

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 07-16-2007, 02:09 AM
vadivelanvaidyanathan vadivelanvaidyanathan is offline
D-Web Genius
 
Join Date: Feb 2007
Posts: 801
vadivelanvaidyanathan is on a distinguished road
Question What are native methods? How do you use them?

What are native methods? How do you use them?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 07-17-2007, 05:10 AM
nssukumar nssukumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Posts: 155
nssukumar is on a distinguished road
Default Re: What are native methods? How do you use them?

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

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


All times are GMT -7. The time now is 02:18 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0