[Ilugc] implement java file in c++

  • From: rajanvn@xxxxxxxxx (Natarajan V)
  • Date: Fri Nov 2 22:13:34 2007

On Nov 2, 2007 3:52 PM, Yogesh Kumar K <yogeshk@xxxxxxxxx> wrote:

i am using the code of a Game in C++ .

What kind of game? High graphics/ 3D games or strategy/text based games?

now i need to add java Game  also .
how to add a java files from C++ code .is it possible java files to be  used .
any possible to import Java files or include java files in c++ is possible .

Is it possible to call a C++ code from Java?
Yes it is possible using JNI API (you have to do some coding here).
With this you can call functions and APIs written in C++ into Java.

Is it possible to call a Java Class from C++ ?
Yes, you can using a system call to invoke the JVM and then passing
the MAIN class name as a parameter

Is it possible to call a particular java class's method alone from C++?
I don't think so.

Did I answer your question?


Regards,
Natarajan

Other related posts: