Issuing native system commands in Scala

前端 未结 5 762
长情又很酷
长情又很酷 2021-02-01 16:42

I want to issue a native system command from a Scala program, and perhaps trap the output. (\"ls\" comes to mind. There may be other ways to get directory information without is

5条回答
  •  -上瘾入骨i
    2021-02-01 17:22

    Scala has complete interoperability with Java. So you can call the system commands from Scala as you would from Java. See this to see how to call system commands from Java.

提交回复
热议问题