calling java from c programs
2 posts in topic
Flat View  Flat View

Posted By:   eitan_mendelowitz
Posted On:   Wednesday, July 24, 2002 06:27 PM

I need to develope a program using a C based API and would like to access already existing java code from the c code. I will be developing for os X. (So please don't point me to JunC++ion - it doesn't have os X support).

Is this possible to do this from straight (non-oop) C? (I know it is from objective-c.) If possible, how is it done?

Sorry if this is a newbie question.

Thank you,


Re: calling java from c programs

Posted By:   Alexander_Krapf  
Posted On:   Friday, July 26, 2002 12:37 PM

Hi Eitan,

I won't point you to JunC++ion then, but if you're interested, you could talk to us. The only reason that JunC++ion is not available on MacOS-X yet is that nobody has seriously asked for it and people ARE asking seriously for other things.

It would not be hard for us to port it, now that g++ is part of the distribution and I love developing on the Mac.

Once you're in C++, it's easy to create some entry points for use by C. Other than that, straight JNI is the way to go. JNI is a C API and it can definitely be used to code to Java. Search the ADC for tips; they have a couple of good pointers specifically for OS-X development.

Will somebody please give us some money to do this on the Mac?


Re: calling java from c programs

Posted By:   Otto_Fowler  
Posted On:   Friday, July 26, 2002 03:25 AM

Yes it is.

Check out developer.apple.com in the java section.

About | Sitemap | Contact