• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

native methods

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
how important are the native methods in the real world application.since the portability and security are affected by
the same i have a feeling they do not serve much purpose.
please let me know
 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well,
native methods have their place. When you want to get access to hardware you can't normally get to via Java or do something really, really, really fast then native code might be what you are looking for. The key is to write the code in as portable language as possible (like C or C++) and not assembler. That way, you can supply the source code with your program so it could be recompiled for the target platform if required.
Native code, like you rightly point out, does restrict the portability of Java so it's something you need to consider carefully.
David.
 
reply
    Bookmark Topic Watch Topic
  • New Topic