• Post Reply Bookmark Topic Watch Topic
  • New Topic

native methods  RSS feed

 
devika cha
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
It is known that native keyword indicates method is written in a platform independent language such as C , but my question is ----
--->To get to access hardware that Java does not know about
is the above statement true about java keyword native, ?
plz explain.
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is a high level language that is platform independent. If you write a native method to do some low level programming, it will definitely be platform dependent.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, that's one good reason to go native (hmmm, that sounds more fun than it is) but not the only reason. You might use native methods to talk to a special C++ module that in turn talks to other applications on the user's machine. Frinstance, we had to make Java talk to a 3270 emulator via documented C APIs in a DLL. We wrote the little C++ wrapper between Java and the vendor's modules.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!