This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Can't find method `setDSTSavings(I)' in type `java.util.SimpleTimeZone'.


Hi there,

I'm trying to compile my project with gcj, and I've suddenly run into a weird problem. Consider the simplified sourcecode given here:

public class DSTTest
{
public static void main(String[] args)
{
java.util.SimpleTimeZone stz = new java.util.SimpleTimeZone( 0, "MyGMT" );
int dtsInMillis = 1*60*60*1000;
stz.setDSTSavings( dtsInMillis );
} // main
} // DSTTest


Compiling with gcj (both 3.3.1 and 3.4.0) results in the following error:

DSTTest.java: In class `DSTTest':
DSTTest.java: In method `DSTTest.main(java.lang.String[])':
DSTTest.java:7: error: Can't find method `setDSTSavings(I)' in type java.util.SimpleTimeZone'.
stz.setDSTSavings( dtsInMillis );
^
1 error


However, if I look into the SimpleTimeZone class in libgcj.jar, I can see that it's actually there:

$ javap -classpath /usr/share/java/libgcj-3.3.1.jar java.util.SimpleTimeZone | grep setDST
public void setDSTSavings(int);


Can anybody tell me what's wrong?

Best regards,
 Martin Egholm



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]