-6

I recently coded alot of java code for a project, and then i had to code something else that I couldn't do in java, but one of my friends could do in C++.. could the codes be united or somewhat?

think of a core game engine made in java and a sound engine made in c++ and i wanna unite them

thank you

  • 4
    Yes it is possible to use [Java code from C++](http://stackoverflow.com/questions/8987089/can-c-call-java-code) and vice versa. Other than that, you'll have to be more specific if you want a specific answer. – Cory Kramer Jan 21 '15 at 20:53

1 Answers1

0

It sounds like what you need is a way to call C++ code from inside a Java program.

Refer to this tutorial http://www.ibm.com/developerworks/java/tutorials/j-jni/j-jni.html

It explains how the Java Native Interface, part of the Java Software Development Kit, can be used to call C++ code from Java and Java code from C++ programs.

dspfnder
  • 1,135
  • 1
  • 8
  • 13