Build Java/Kotlin project from C++

I have a LibGDX game which im developing in IntelliJ IDEA and now i’m making a C++ (Qt) UI to modify my game, like a game engine. So now i want to build and run my project from my C++ project, similar to the IntelliJ build and run button. Is there an C++ API to do this? or should i run the batch files from C++ ?
[Note: I dont have experience in gradle, just adding dependencies, so i’ll appreciate link resources to start implementing my idea if it’s possible]