run a executable jar from c++ code

前端 未结 2 2007
后悔当初
后悔当初 2021-01-25 04:17

I need to execute a jar file from inside of some C++ code.

i tried this following command

int ret = execlp(\"java\", \"java\", \"-jar\", \"m         


        
2条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-25 04:53

    The normal way to solve this problem is to fork() and then exec() from the newly spawned process.

提交回复
热议问题