Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#123 Can not find symbol compareTo when building test scripts

Mike Nicholson

When I create a test script using the Java API that contains calls to compareTo I recieve the error "cannot find symbol method compareTo..." This also occurs when I have a test script that I export to java within the GUI. Attached is a screenshot showing an exported script with this error occurring in the GUI. Additionally I have copied and pasted the error I see when I attempt to build one of the java files at the command line:

[javac] /home/nic47222/tplan_script/RfcBasicTest.java:13: cannot find symbol
[javac] symbol : method compareTo(java.io.File[],java.lang.String,double,java.awt.Rectangle)
[javac] location: class RfcBasicTest
[javac] compareTo( new File[] { new File("imgs/rfc_start.png")}, "default", 98.0,new Rectangle(0, 68, 800, 532));

The contents of the file I'm trying to build:

import com.tplan.robot.scripting.DefaultJavaTestScript;
import com.tplan.robot.scripting.JavaTestScript;
import java.io.File;
import java.io.IOException;

import java.awt.Rectangle;

public class RfcBasicTest extends DefaultJavaTestScript implements JavaTestScript

public void test(){
super.compareTo( new File[] { new File("imgs/rfc_start.png")}, "default", 98.0,new Rectangle(0, 68, 800, 532));
}catch(IOException ex){

This occurs when using sun (oracle) java sdk 1.6.0_21 on Linux and windows as well as openjdk 1.6.0 on Linux. The error occurs on the GUI in Windows and Linux as well.


  • Mike Nicholson
    Mike Nicholson

    Accidentally clicked refresh. My apologies for the duplicate.