How to invoke one more java process from java program
I want to execute mvn exec:java开发者_JS百科 command from a java program.
I tried Runtime and ProcessBuilder API but unbale to acheive.
Please help me in this problem.
Regards, Praveen
Most probably java can not find "mvn" executable. Maintaing PATH variable and finding executables is a function of a command line shell (cmd, bash, etc..). Runtime.exec() does not use your shell.
You need to supply full path to executable for Runtime.exec() to find it.
精彩评论