幫助。我開始學習Scala。我的程序在我的Windows PC上運行良好,但每當我嘗試在我的Linux機器上運行程序(ibmp2)時,輸出都只是兩次打印的主機名。看下面的例子。怎麼了?scala未在Centos Linux機器上運行
[[email protected] ~]$ cat hello.scala val oneTwo = List(1, 2) val threeFour = List(3, 4) val oneTwoThreeFour = oneTwo ::: threeFour println(""+ oneTwo +" and "+ threeFour +" were not mutated.") println("Thus, "+ oneTwoThreeFour +" is a new list.") [[email protected] ~]$ scala hello.scala ibmp2: ibmp2 [[email protected] ~]$ which scala /usr/local/scala-2.8.1.final/bin/scala [[email protected] ~]$ scala Welcome to Scala version 2.8.1.final (Java HotSpot(TM) Client VM, Java 1.6.0_17). Type in expressions to have them evaluated. Type :help for more information. scala> println("hello") hello scala>
我修改了主機文件以將主機名添加到本地主機,現在可以使用了,謝謝! – 2011-01-09 20:30:52