Intellij IDEA带参数运行
转自:http://blog.csdn.net/silentwolfyh/article/details/51491462
-
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)
-
-
}
-
-
}