Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java.util.Calendar compilation problems

Status
Not open for further replies.

PCSAARON

Programmer
Jul 9, 2002
131
0
0
US
I am trying to compile a project that was compiled in a newer versin of java. But want to compile it with an older version since the newer version of Java is TOO slow with the application. I get this error when compiling...

cannot resolve symbol
symbol: method compareTo (java.util.Calendar)
location: class java.util.Calendar
int test = calednar_one.compareTo(calendar_two);


The java.util.Calendar is probably an older version and doesn't have compareTo? Can anyone help me figure out a way to update the java.util.Calendar or get a similar method?

Thanks.
 
Calendar.CompareTo() was introduced in 1.5, so it will not compile in any earlier JDK version.
 
I don't know what compareTo does but I imagina you can compare the results of getTimeInMillis() from both.

Btw, I thoguht Tiger was quicker than the older versions, but I see it's not always true.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top