Results 1 to 3 of 3
  1. #1
    rcbandit is offline Member
    Join Date
    Aug 2011
    Posts
    16
    Rep Power
    0

    Default 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

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,508
    Blog Entries
    7
    Rep Power
    20

    Default Re: Call Java Native Interface from web application

    Quote Originally Posted by rcbandit View Post
    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
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    rcbandit is offline Member
    Join Date
    Aug 2011
    Posts
    16
    Rep Power
    0

    Default 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

Similar Threads

  1. Replies: 0
    Last Post: 10-03-2011, 08:27 AM
  2. Java web console with Java Native interface
    By rcbandit in forum Advanced Java
    Replies: 1
    Last Post: 08-22-2011, 03:07 PM
  3. Replies: 0
    Last Post: 05-13-2011, 03:17 AM
  4. Java Native Interface Question
    By RichWade in forum Advanced Java
    Replies: 20
    Last Post: 11-29-2010, 06:26 PM
  5. JavaMe and native application interoperability
    By islamfunny in forum CLDC and MIDP
    Replies: 1
    Last Post: 10-27-2008, 09:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •