• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

communicating between java code and visual c code

hi friends.i have a application in java.i want the gui to be made in visual c.
is it possible to communicate between java classes and visual c files.
kindly elaborate.many thanks


riv
0
riv9394
Asked:
riv9394
  • 3
1 Solution
 
akshayxxCommented:
Hi riv9394,
yes it is very much possible , ever heard of JNI( java native interface)native language programming),
let me get you the tutorial link for this .. go throuth this and let us know if u got it.
http://java.sun.com/docs/books/tutorial/native1.1/index.html

Cheers!
0
 
akshayxxCommented:
using JNI , u can call C/C++ functions  from java objects,
while the other way round is also possible , calling java code from C/C++ , but i dont think u'll need that for now, as the 'communication between java and c" can be achieved with JNI

u have to be more specific about your requirement.

if u have already written most of code in C and u want to use it in java, then JNI is the way to go ,
while if u have bunch of java classes and u want to invoke them from C/C++ then  the "other way"

0
 
akshayxxCommented:
i just re-read ur comment ,, well i think u need to need to invoke the java classes from the VC code , for that  
go through following sample
http://www.inonit.com/cygwin/jni/invocationApi/c.html
0
 
riv9394Author Commented:
dear friend
many thanks sorry for being late in awarding u ur points.
many thanks again
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now