madrenegade / ScalaChat

2 stars 0 forks source link

Unter Ubtuntu mangels Swing nicht kompilierbar #1

Open mova opened 13 years ago

mova commented 13 years ago

scalac ChatClient.scala ChatClient.scala:1: error: object swing is not a member of package scala import scala.swing._ ^ ChatClient.scala:24: error: value startup is not a member of AnyRef with AnyRef with ScalaObject super.startup(args) ^ ChatClient.scala:27: error: too many arguments for constructor Object: ()java.lang.Object val messageArea = new TextArea(20, 50) { editable = false } ^ three errors found

Ich habe eine scala-swing.jar in /usr/share/java/ gefunden, aber auf die greift er scheinbar nicht zu.

sbradl commented 13 years ago

Das ist kein Problem der Anwendung sondern deiner Scala Installation. Wie hast du Scala installiert? Aus den Paketquellen oder per Hand (einfach irgendwo hinkopiert) oder per sbaz?

mova commented 13 years ago

sudo apt-get install scala

sbradl commented 13 years ago

Welche Ubuntu-Version?

mova commented 13 years ago

11.10

sbradl commented 13 years ago

Spätestens Sonntag Abend poste ich hier eine Lösung für das Problem.

mova commented 13 years ago

Nach manueller Installation funktioniert das Kompilieren. Scheint als würde Scala über die Paketverwaltung nicht sauber eingerichtet.

Allerdings öffnet sich das Fenster und nach tippen...

user_in_ScalaChat>scala ChatClient 1235 Info: created service at Node(127.0.0.1,1235) Info: Thread[Thread-1,6,main]: waiting for new connection on port 1235... Info: initializing scala.actors.Scheduler$@5097d026... Info: scala.actors.scheduler.ThreadPoolConfig$@45e67e6a: java.version = 1.6.0_23 Info: scala.actors.scheduler.ThreadPoolConfig$@45e67e6a: java.vm.vendor = Sun Microsystems Inc. Info: scala.actors.scheduler.ForkJoinScheduler@27b03c1a: parallelism 16 Info: scala.actors.scheduler.ForkJoinScheduler@27b03c1a: max pool size 256 Info: scala.actors.Scheduler$@5097d026: starting new scala.actors.scheduler.ForkJoinScheduler@27b03c1a [class scala.actors.scheduler.ForkJoinScheduler] ChatClient$@3a51127a: caught java.lang.NullPointerException java.lang.NullPointerException at ChatClient$$anonfun$act$1$$anonfun$apply$1.apply(ChatClient.scala:84) at ChatClient$$anonfun$act$1$$anonfun$apply$1.apply(ChatClient.scala:77) at scala.actors.ReactorTask.run(ReactorTask.scala:31) at scala.actors.Reactor$class.resumeReceiver(Reactor.scala:129) at ChatClient$.scala$actors$ReplyReactor$$super$resumeReceiver(ChatClient.scala:8) at scala.actors.ReplyReactor$class.resumeReceiver(ReplyReactor.scala:68) at ChatClient$.resumeReceiver(ChatClient.scala:8) at scala.actors.Actor$class.searchMailbox(Actor.scala:500) at ChatClient$.searchMailbox(ChatClient.scala:8) at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(Reactor.scala:117) at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply(Reactor.scala:114) at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply(Reactor.scala:114) at scala.actors.ReactorTask.run(ReactorTask.scala:33) at scala.concurrent.forkjoin.ForkJoinPool$AdaptedRunnable.exec(ForkJoinPool.java:611) at scala.concurrent.forkjoin.ForkJoinTask.quietlyExec(ForkJoinTask.java:422) at scala.concurrent.forkjoin.ForkJoinWorkerThread.mainLoop(ForkJoinWorkerThread.java:340) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:325) Info: scala.actors.scheduler.ForkJoinScheduler@27b03c1a: all actors terminated Info: scala.actors.scheduler.ForkJoinScheduler@27b03c1a: initiating shutdown... $mo@:ScalaChat>scala ChatClient 1234 Info: created service at Node(127.0.0.1,1234) Info: Thread[Thread-1,6,main]: caught java.net.BindException: Address already in use Info: Thread[Thread-1,6,main]: shutting down... Info: initializing scala.actors.Scheduler$@18987a33... Info: scala.actors.scheduler.ThreadPoolConfig$@4abf053f: java.version = 1.6.0_23 Info: scala.actors.scheduler.ThreadPoolConfig$@4abf053f: java.vm.vendor = Sun Microsystems Inc. Info: scala.actors.scheduler.ForkJoinScheduler@3a51127a: parallelism 16 Info: scala.actors.scheduler.ForkJoinScheduler@3a51127a: max pool size 256 Info: scala.actors.Scheduler$@18987a33: starting new scala.actors.scheduler.ForkJoinScheduler@3a51127a [class scala.actors.scheduler.ForkJoinScheduler] ChatClient$@2d2bf892: caught java.lang.NullPointerException java.lang.NullPointerException at ChatClient$$anonfun$act$1$$anonfun$apply$1.apply(ChatClient.scala:84) at ChatClient$$anonfun$act$1$$anonfun$apply$1.apply(ChatClient.scala:77) at scala.actors.ReactorTask.run(ReactorTask.scala:31) at scala.actors.Reactor$class.resumeReceiver(Reactor.scala:129) at ChatClient$.scala$actors$ReplyReactor$$super$resumeReceiver(ChatClient.scala:8) at scala.actors.ReplyReactor$class.resumeReceiver(ReplyReactor.scala:68) at ChatClient$.resumeReceiver(ChatClient.scala:8) at scala.actors.Actor$class.searchMailbox(Actor.scala:500) at ChatClient$.searchMailbox(ChatClient.scala:8) at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(Reactor.scala:117) at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply(Reactor.scala:114) at scala.actors.Reactor$$anonfun$startSearch$1$$anonfun$apply$mcV$sp$1.apply(Reactor.scala:114) at scala.actors.ReactorTask.run(ReactorTask.scala:33) at scala.concurrent.forkjoin.ForkJoinPool$AdaptedRunnable.exec(ForkJoinPool.java:611) at scala.concurrent.forkjoin.ForkJoinTask.quietlyExec(ForkJoinTask.java:422) at scala.concurrent.forkjoin.ForkJoinWorkerThread.mainLoop(ForkJoinWorkerThread.java:340) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:325) Info: scala.actors.scheduler.ForkJoinScheduler@3a51127a: all actors terminated Info: scala.actors.scheduler.ForkJoinScheduler@3a51127a: initiating shutdown...