• Post Reply Bookmark Topic Watch Topic
  • New Topic

Native  RSS feed

 
raja singh kumar
Ranch Hand
Posts: 189
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the use of native keyword? If a native method is written in a language other than Java, how exactly can one use it. What is the use of having a code like the one below?

 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is used to call code written in other languages than Java, such as code written in C or C++.

You do that by using JNI, Java Native Interface.
 
Tim Moores
Saloon Keeper
Posts: 4036
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, code in other languages -C/C++ in particular- can be called that way using the JNI API. Se the JNI FAQ at http://www.oracle.com/technetwork/java/jni-j2sdk-faq-141732.html
 
Ganesh Patekar
Bartender
Posts: 726
23
Eclipse IDE Hibernate jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Old thread might help click here
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!