Java execute process on linux

前端 未结 2 785
借酒劲吻你
借酒劲吻你 2020-12-19 19:26

I\'ve been struggling for a while now with this problem and i can\'t seem to fix it. i already have tried different approaches (Runtime.exec(), ProcessBuiler) but none seem

2条回答
  •  执念已碎
    2020-12-19 19:59

    Since it is another Java program you might want to consider running it in the same process because it's much easier to communicate between the two programs if they live in the same process. Have you tried running the command outside your program? Does it work? What does the meta-inf.mf file in the jar hold? It might be that the classpath in the meta-inf.mf file isn't relative so any dependent jars can't be found.

提交回复
热议问题