Setting the environment for ProcessBuilder

前端 未结 6 1057
囚心锁ツ
囚心锁ツ 2020-12-06 17:14

I have a strange problem setting the Linux environment from Java (1.6); specifically the \"PATH\" variable.

In a nutshell, I have a pipeline for running native proce

6条回答
  •  庸人自扰
    2020-12-06 17:30

    I think you're right. The currently executing java code will not use the environment variables you are preparing for the child process you are executing. You could create an intermediate executable or script that you can pass variables to and have it execute your program.

提交回复
热议问题