• Post Reply Bookmark Topic Watch Topic
  • New Topic

Native method  RSS feed

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, please answer to this Q

Java needs to interact with System calls of Unix ..so what you do ..that can be done by native method with C..
then the Question starts here.. compiled code of C in unix is dropped in Windows OS..now the Java has to invoke the native method..and needs to run without error ?
Does this possible..

Please let me know your thoughts..thanks..
 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to have separate native libraries for each platform. Not only would the code generally not work due to platform differences, but the entire dynamic library mechanism is different; the *.so file you'd deploy on a UNIX system is a completely different type of file than the *.dll you'd use on Windows. Of course, a single *.so wouldn't be enough for all the different UNIX platforms; you'd need separate ones to work on Linux, MacOS, Solaris, etc.
 
Rajan Venkat
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ernest,

Thanks for your reply..
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!