Error: Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified. Applies for all executables

前端 未结 2 471
轮回少年
轮回少年 2020-12-21 07:11

My goal is to run SVN commands from java for one of my requirements, for the same i have already installed TortoiseSVN command line tool. Added the appropriate path\"C:/Prog

2条回答
  •  被撕碎了的回忆
    2020-12-21 07:48

    You need to separate the executable from its arguments:

    new ProcessBuilder("svn", "--version")
    

    See the ProcessBuilder constructor JavaDoc for more details and examples.

提交回复
热议问题