Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

native methods

 
karan roy
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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
 
David Harrigan
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!