Scala compilation / running problems
- Updated Sunday, April 5th 2015 @ 14:30:14
The Compilation and test match sections claim to have "Succeeded", yet when I look in the compilation logs, I see an error:
"mount: can't find jvm in /etc/fstab or /etc/mtab"
And then in the test match logs:
"Error: Could not find or load main class src.main.Main"
and the inevitable:
"Response timed out (10000ms), let your bot return 'No moves' instead of nothing or make it faster.
Output from your bot: nullError, action set to 'check'. player1 check 0"
My bot is very simple, the directory Structure is:
zip_root - main - Main.scala
And Main.scala simply contains:
package main
/** * Created by imran on 05/04/15. */ object Main extends App { override def main (args: Array[String]) { for(line <- io.Source.stdin.getLines()) { System.err.println(s"Received: '$line'") if("Action".equals(line.split(" ")(0))) { println("check 0") } } } }
Have I done something obviously wrong? Or is there a bug here? Cheers
- Created Sunday, April 5th 2015 @ 17:37:27
The file with the main routine needs to be in the zip root instead of a subfolder
- Created Sunday, April 5th 2015 @ 17:52:10
Hi nikooO_o, thanks for that - it appears to be working (well, at least running, now!).
What does that mean for any jars I want to depend on? Is that a no-go? Do I need to stick them in the root directory? Or could I put them anywhere?
- Created Sunday, April 5th 2015 @ 22:23:54
I'm not sure actually. Simply trying is probably the fastest route to the answer. Jim should be able to tell you, however you'll probably have to wait until Tuesday for the answer.