Invoke Java library from C/C++

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

Invoke Java library from C/C++

 
0
  #1
Apr 3rd, 2005
Hello everyone,


Are there any approaches to invoke Java libraries from C/C++?


Thanks in advance,
George
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 8
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Invoke Java library from C/C++

 
0
  #2
Apr 3rd, 2005
Hi everyone,

What you are asking is rather difficult but you could ude something called the Java Native Interface

Here are a few links to point you to the right direction

http://www.acm.org/crossroads/xrds4-2/jni.html
http://home.pacifier.com/~mmead/jni/cs510ajp/index.html
http://www.science.uva.nl/ict/ossdoc...ing/index.html

This is a tutorial on the Java Native Interface

http://www.javaworld.com/javaworld/j...jw-10-jni.html

I hope this helps you

Yours Sincerely

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

Re: Invoke Java library from C/C++

 
0
  #3
Apr 4th, 2005
Thanks freesoft_2000,


Originally Posted by freesoft_2000
Hi everyone,

What you are asking is rather difficult but you could ude something called the Java Native Interface

Here are a few links to point you to the right direction

http://www.acm.org/crossroads/xrds4-2/jni.html
http://home.pacifier.com/~mmead/jni/cs510ajp/index.html
http://www.science.uva.nl/ict/ossdoc...ing/index.html

This is a tutorial on the Java Native Interface

http://www.javaworld.com/javaworld/j...jw-10-jni.html

I hope this helps you

Yours Sincerely

Richard West
You are an expert and your reply is very helpful. I think you must know how JVM implements JNI internally. Can you recommend some materials dealing with JNI internal implementation?


regards,
George
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 8
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Invoke Java library from C/C++

 
0
  #4
Apr 4th, 2005
Hi everyone,

What happens is that the javah command converts the java source code to native code entry points. This command was provided for interfacing mainly for C/C++ but if you wish to use other languages then you will have to do your own translation of entry points and arguments thus creating your own version of javah for say pascal which is not recommended.

As for recommending about the internal implementation of jni in the jvm, i am not too sure about that and thus am unable to recommend articles about it

The link to the javaworld article especially on the second and third page talks more about the internal working between the jni and jvm.

Yours Sincerely

Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 189
Reputation: George2 is an unknown quantity at this point 
Solved Threads: 0
George2 George2 is offline Offline
Junior Poster

Re: Invoke Java library from C/C++

 
0
  #5
Apr 5th, 2005
Thanks freesoft_2000,


Originally Posted by George2
Thanks freesoft_2000,




You are an expert and your reply is very helpful. I think you must know how JVM implements JNI internally. Can you recommend some materials dealing with JNI internal implementation?


regards,
George
Your reply is very helpful!


regards,
George
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 5539 | Replies: 4
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC