Example #1
0
  @Override
  public void start() {
    Robocode robocode = new Robocode();

    URL url = getDocumentBase();
    FileUtil.setUrl(getCodeBase());

    selected_robotsx = getParameter("sel_robots");

    JSObject window = JSObject.getWindow(this);
    String summary = "Robocode Battle";
    LogUtil.setWindow(window);
    // LogUtil.log("codebase url:: " + url.getFile());
    LogUtil.log(summary);

    Properties prop = System.getProperties();
    System.out.println(prop.getProperty("java.class.path"));
    System.out.println(url.getFile());
    JPanel newContentPane = robocode.initialize(selected_robotsx);
    setContentPane(newContentPane);
  }
Example #2
0
  /**
   * Use the command-line to start Robocode. The command is:
   *
   * <pre>
   *    java -Xmx512M -Dsun.io.useCanonCaches=false -jar libs/robocode.jar
   * </pre>
   *
   * @param args an array of command-line arguments
   */
  public static void main(String[] args) {

    Robocode robocode = new Robocode();
    robocode.initialize(selected_robotsx);
  }