Results 1 to 3 of 3

Thread: JNI beginner

  1. #1
    M77's Avatar
    M77
    M77 is offline Member
    Join Date
    May 2008
    Location
    LV
    Posts
    43
    Rep Power
    0

    Default JNI beginner

    hi
    i'm an experienced Java programmer
    but a beginner in jni
    i use a library that calls System.loadLibrary("xxx");
    i have *.c and *.h source code
    i use Win XP 32 bit
    how can i create the specified xxx to make the library work

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    You need to create a JNI bridge program (not sure of the official name for it) that will allow you to bridge Java to the C library. Java has a utility for creating your header file. Go through the JNI tutorials and even online books (Google will find these for you) for the details.

  3. #3
    Ray Newman is offline Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    0

    Default

    Or take a look at JNA. JNA provides Java programs easy access to native shared libraries (DLLs on Windows) without writing anything but Java codeóno JNI or native code is required.
    Ray

Similar Threads

  1. Need Help - Beginner
    By ooooohmaul in forum New To Java
    Replies: 4
    Last Post: 08-08-2010, 04:22 AM
  2. Beginner, need a little help
    By jimmy-lin in forum New To Java
    Replies: 6
    Last Post: 10-10-2009, 01:00 AM
  3. beginner here...help please
    By shroomiin in forum New To Java
    Replies: 6
    Last Post: 09-15-2009, 11:06 PM
  4. Beginner needs help!
    By Polyy in forum New To Java
    Replies: 1
    Last Post: 11-27-2008, 05:12 AM
  5. almost done...beginner needs help plz..
    By shongo in forum New To Java
    Replies: 15
    Last Post: 11-10-2008, 08:14 AM

Posting Permissions

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