Intellij IDEA15: 带着参数 运行

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)  
  
  }  
  
}  

   

原文地址:https://www.cnblogs.com/ShaYeBlog/p/7297460.html