How to start external application from Scala

scala

Solution

Use the Process library, which was a part of SBT but is now being separated from it. You can find it here in the Scala Tools repository.

With that, it can be as simple as:

import Process._
"find project -name *.jar" ! log

Edit

As for Scala 2.9.0, this is available on the standard library, under `scala.sys.process`. Instead of importing `Process._`, you should import `scala.sys.process._`, the package object.

Problem

How to start external application from Scala?

Original source