Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > how to load a c lib and invoke it's method in java?

Reply
Thread Tools

how to load a c lib and invoke it's method in java?

 
 
dxuranus
Guest
Posts: n/a
 
      07-11-2006
just like the title
there are a lot of resources about jni. but these resources usualy
first write the java and then write the c,but now i hava c so what can
i do? thanks for any help

 
Reply With Quote
 
 
 
 
Chris Uppal
Guest
Posts: n/a
 
      07-11-2006
dxuranus wrote:

> there are a lot of resources about jni. but these resources usualy
> first write the java and then write the c,but now i hava c so what can
> i do? thanks for any help


The straightforward way -- write new JNI code, callable from Java, which itself
calls the existing C code.

The expensive way -- use one of:
http://jniwrapper.com/
http://www.excelsior-usa.com/xfunction.html

The interesting way -- read:
http://java.sun.com/docs/books/jni/index.html
In particular chapter 9, the code for which can also be found from the above
page.

-- chris


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
/usr/lib/pa20_64/dld.sl: Unsatisfied data symbol 'typeid__XTQ2_3std9exception_'in load module '/usr/lib/libcryptograph2_64.sl' TsanChung Java 4 09-21-2008 09:16 PM
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 230. Feyruz Perl Misc 4 10-14-2005 06:47 PM
invoke a method by reflection£¬the method's parameters can not be ArrayList? jerry051 ASP .Net 2 08-02-2005 10:35 AM
[Method.invoke] wrapper - accessing arguments passed to user method. Storm Java 1 05-01-2004 11:20 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57