• 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: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic