Menu

The battle doesn't run

Help
2014-05-18
2014-05-21
  • Jonathan Lindberg

    I'm a newbie, and When I did all the stuff on the tutorials http://robowiki.net/wiki/Robocode/Getting_Started, http://robowiki.net/wiki/Robocode/My_First_Robot,
    it doesn't start the battles.
    What I can read of the console window, there seems to be some trouble, so it shuts itself down.
    Some kind of uncaught exeption.

    I hope anyone can help me so I can get on creating.

     
  • Flemming N. Larsen

    What is written out in the robot console?

    Does the sample robot run on your system?

    Does the MyFirstRobot run without problems?

    You could write your code here so I/we is able to see your robot. If you copy paste your robot into the answer, then start the code by writing (~~~~~~) and end it the same way (see Formatting Help).

     
  • Jonathan Lindberg

    This is what it says when i load the samples in the Getting Started tutorial.

    C:\robocode>java -Xmx512M -cp libs/robocode.jar robocode.Robocode
    Loaded net.sf.robocode.api
    Loaded net.sf.robocode.core
    Loading plugins from C:\robocode\libs
    Loaded net.sf.robocode.battle
    Loaded net.sf.robocode.host
    Loaded net.sf.robocode.repository
    Loaded net.sf.robocode.sound
    Loaded net.sf.robocode.ui
    Loaded net.sf.robocode.ui.editor
    Reading robot database
    Preparing battle...
    UncaughtException on thread class java.awt.EventDispatchThread:
    java.lang.NoSuchMethodError: net.sf.robocode.security.HiddenAccess.createRules(I
    IIDJZ)Lrobocode/BattleRules;
            at net.sf.robocode.battle.Battle.setup(Battle.java:179)
            at net.sf.robocode.battle.BattleManager.startNewBattleImpl(BattleManager
    .java:177)
            at net.sf.robocode.battle.BattleManager.startNewBattle(BattleManager.jav
    a:130)
            at net.sf.robocode.ui.dialog.NewBattleDialog.finishButtonActionPerformed
    (NewBattleDialog.java:118)
            at net.sf.robocode.ui.dialog.WizardController.finishButtonActionPerforme
    d(WizardController.java:68)
            at net.sf.robocode.ui.dialog.WizardController.access$100(WizardControlle
    r.java:32)
            at net.sf.robocode.ui.dialog.WizardController$EventHandler.actionPerform
    ed(WizardController.java:45)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
    ce)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$400(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
    ce)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
    ce)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
    ce)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.WaitDispatchSupport$2.run(Unknown Source)
            at java.awt.WaitDispatchSupport$4.run(Unknown Source)
            at java.awt.WaitDispatchSupport$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.awt.WaitDispatchSupport.enter(Unknown Source)
            at java.awt.Dialog.show(Unknown Source)
            at java.awt.Component.show(Unknown Source)
            at java.awt.Component.setVisible(Unknown Source)
            at java.awt.Window.setVisible(Unknown Source)
            at java.awt.Dialog.setVisible(Unknown Source)
            at net.sf.robocode.ui.dialog.WindowUtil.packCenterShow(WindowUtil.java:1
    43)
            at net.sf.robocode.ui.WindowManager.showNewBattleDialog(WindowManager.ja
    va:383)
            at net.sf.robocode.ui.dialog.MenuBar.battleNewActionPerformed(MenuBar.ja
    va:237)
            at net.sf.robocode.ui.dialog.MenuBar.access$100(MenuBar.java:59)
            at net.sf.robocode.ui.dialog.MenuBar$EventHandler.actionPerformed(MenuBa
    r.java:111)
            at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
            at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
            at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
            at javax.swing.AbstractButton.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
            at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown
    Source)
            at java.awt.Component.processMouseEvent(Unknown Source)
            at javax.swing.JComponent.processMouseEvent(Unknown Source)
            at java.awt.Component.processEvent(Unknown Source)
            at java.awt.Container.processEvent(Unknown Source)
            at java.awt.Component.dispatchEventImpl(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
            at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
            at java.awt.Container.dispatchEventImpl(Unknown Source)
            at java.awt.Window.dispatchEventImpl(Unknown Source)
            at java.awt.Component.dispatchEvent(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$400(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
    ce)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
    ce)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.awt.EventQueue$4.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
    ce)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
    

    And I even tried the MyFirstRobot tutorial, and get the same problem.

     
  • Flemming N. Larsen

    This sounds really strange. You should be able to run battles with the sample robots without any trouble.

    I suggest that you remove your current installation of Robocode, and take a backup of your robot source code, if you have anything to back up, and then reinstall Robocode. It seems to me that your installation is broken somehow.

    If this does not work, I should like to know:
    1) Which OS system and version are you running Robocode on, e.g. Windows 8.1 64-bit
    2) Which version of Robocode are you using, e.g. 1.9.2.0.
    3) Which version of Java are you using, e.g. Oracle JDK 7 Update 55 64-bit.

    This way I will be better at reproducing the problem you see. :-)

     
  • Jonathan Lindberg

    I solved it, it works great now. Thanks for the help. :)

     
  • Flemming N. Larsen

    I am happy to hear that. :-)

     

Log in to post a comment.

Auth0 Logo