Call Java Native Interface from web application
I have a question about how to develop a web application which can call C functions using Java Native Interface (JNI). My biggest question is what king of package do I need in order JNI to work: WAR package or EAR package deployed on JBoss 7 server? Is there any difference in this case?
Regards
Re: Call Java Native Interface from web application
Quote:
Originally Posted by
rcbandit
I have a question about how to develop a web application which can call C functions using Java Native Interface (JNI). My biggest question is what king of package do I need in order JNI to work: WAR package or EAR package deployed on JBoss 7 server? Is there any difference in this case?
All you need is a C (or C++) compiler to compile your wrapper functions. There's a tool 'javah' in your JDK that can generate the header file(s) for your wrapper(s).
kind regards,
Jos
Re: Call Java Native Interface from web application
Yes but the interesting part is which type of packaging - EAR or WAR is more suitable to be used with JNI. As far as I know WAR is just for JSF (web content).
kind regards,
Peter