0

this is my code

 def main(args: Array[String]): Unit = {
    val engine = new RobocodeEngine
    def rounds = 1
   val battlefield = new BattlefieldSpecification(1000, 500)
   //val robots = engine.getLocalRepository()
   engine.setVisible(true)

   // val obs = new BattleObserver
    //engine.addBattleListener(obs)
    //val battleSpec = new BattleSpecification(rounds, battlefield, robots)
    //engine.runBattle(battleSpec, true)
    //engine.close()
    //System.exit(0)

  }

and this is the error raised by setVisible (but it behaves the same with getLocalRepository

Exception in thread "Application Thread" java.lang.ClassCircularityError: net/sf/robocode/host/security/RobocodeSecurityPolicy$2
at net.sf.robocode.host.security.RobocodeSecurityPolicy.implies(RobocodeSecurityPolicy.java:101)
at java.security.ProtectionDomain.implies(ProtectionDomain.java:272)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:344)
at java.security.AccessController.checkPermission(AccessController.java:560)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.System.setProperty(System.java:781)
at net.sf.robocode.ui.WindowManager.setEnableGUI(WindowManager.java:104)
at net.sf.robocode.ui.WindowManager.setVisibleForRobotEngine(WindowManager.java:622)
at robocode.control.RobocodeEngine.setVisible(RobocodeEngine.java:196)
at main.ScalaBot$.main(main.scala:11)
at main.ScalaBot.main(main.scala)

Where should i look for to find the circularity?

Chobeat
  • 3,445
  • 6
  • 41
  • 59
  • How are you building and running this? – themel Mar 18 '13 at 19:00
  • through Eclipse. I checked my build configuration. I tinkered a bit before but it's all reverted to default. I removed all references to other libraries except for robocode. There are no particular settings for the VM or stuff like that – Chobeat Mar 18 '13 at 19:18

0 Answers0