Intellij IDEA带参数运行

Intellij IDEA带参数运行

转自:http://blog.csdn.net/silentwolfyh/article/details/51491462

[python] view plain copy
  1. package main.scala  
  2.   
  3. /**  
  4.   * Created by silentwolf on 2016/5/24.  
  5.   */  
  6. object FileIO {  
  7.   
  8.   def main(args: Array[String]) {  
  9.   
  10.     if (args.length != 2) {  
  11.       System.err.println("Usage: FileIO <sourcePath> <desPath>")  
  12.       System.exit(1)  
  13.     }  
  14.   
  15.     val Array(sourcePath,desPath) = args  
  16.   
  17.     println("第一个参数:"+sourcePath)  
  18.   
  19.     println("第二个参数:"+desPath)  
  20.   
  21.   }  
  22.   
  23. }  



Intellij IDEA带参数运行

Intellij IDEA带参数运行   Intellij IDEA带参数运行