0

So, I want to use C++ to write an editor for my research, but the program that would receive the .txt generated by the editor is already written in Java. Is there a way for me to call the main.java method from my c++ program(since I'd have to pass in the .txt file as a parameter I guess I'd have to do so by compiling the java src code at runtime)?

1 Answers1

0

It it possible to run a java method using C++ have a look at this. If you just want to launch your java program then you don't need JNI.

system("java -jar program.jar");
Shiro
  • 2,610
  • 2
  • 20
  • 36