Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting a Java process from a C++ process

Tags:

java

c++

process

How can I start a Java application from within a C++ process?

I don't want to invoke just some parts of the Java application, as could be done with JNI, but actually run the whole Java application.

like image 331
Idov Avatar asked Nov 24 '25 14:11

Idov


1 Answers

Yes, you can follow the steps at this link: http://java.sun.com/docs/books/jni/html/invoke.html

Note that the sample invokes the "main" method of the loaded class so it would be just as if you did something like java -jar app.jar where the manifest in app jar specifies a main class that loads and starts the app.

like image 102
Rob H Avatar answered Nov 26 '25 03:11

Rob H



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!