Menu

Cannot resolve robocode import

Help
Neal Smith
2019-05-26
2019-06-03
  • Neal Smith

    Neal Smith - 2019-05-26

    Hi,
    I have been trying to get robocode to work with Eclipse 2018-09 without success. I followed the instructions on the wiki when creating the project, like adding the jar file to libraries and adding javadoc. When I create a new class with AdvancedRobot as a superclass, it cannot resolve the import robocode.

    Things I've tried so far (which didn't work):
    Changing the superclass to robot
    Adding robocode.jar to classpath instead of modulepath in libraries when setting up the project
    Uninstalling and reinstalling robocode as well as the IDE itself
    Repeated the process on my mac (still getting the same error)

    I've also attached some screenshots. Thanks!

     
  • Flemming N. Larsen

    Hi Neal, and sorry for the late answer.

    I tried out creating a new project in Eclipse 2018.09 and JDK 10 like you. 100% identical setup, and got the same error.
    The error is caused by the module-info.java, which is created with newer JDK versions (due to JigSaw, where code is modulized).

    The solution is to just delete the module-info.java.
    It should not be used or created. I will update the Wiki with this info.

     
    • Neal Smith

      Neal Smith - 2019-06-03

      Thank you! I knew it had to be some minor mistake, glad you put it on the wiki so some other people who could have the same problem know how to fix it.

       

Log in to post a comment.