代碼:
import java.io.PrintWriter
import java.net.ServerSocket
import scala.io.Source
/**
* Created by Administrator on 2017/5/17.
*/
object SaleDeviceSimulation {
def main(args: Array[String]) = {
if (args.length != 3) {
System.err.println("Usage: <filename><port><milliseconds>")
System.exit(1)
}
val filename = args(0)
val lines = Source.fromFile(filename).getLines.toList
val filerow = lines.length
...
打包后上傳到CentOS,用java -classpath運行,報錯
NoClassDefFoundError:scala/io/Source
打包的時候包含了scala-sdk-2.10.5,而且CentOS上也安裝了scala-sdk-2.10.5,怎么還是沒這個類呢?
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/64449.html
標籤:Spark
上一篇:阿里云服務器上 獲取流的方案
