Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference b/w native method and loadLibrary function

 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear friends,

we can call a dll using loadLibrary of Runtime class.

we can also access the dll using native method. what is the difference ?

which method is best
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually your native method must be defined in the DLL file, that is why you must load the library for its invocation to suceed.

That is done through JNI you can read about JNI in the Sun JDK Specification or follow the link here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic