package main.scala

/**
* Created by silentwolf on 2016/5/24.
*/
object FileIO { def main(args: Array[String]) { if (args.length != 2) {
System.err.println("Usage: FileIO <sourcePath> <desPath>")
System.exit(1)
} val Array(sourcePath,desPath) = args println("第一个参数:"+sourcePath) println("第二个参数:"+desPath) } }

Intellij IDEA15: 带着参数 运行-LMLPHP

Intellij IDEA15: 带着参数 运行-LMLPHP   Intellij IDEA15: 带着参数 运行-LMLPHP

04-15 08:49