Can't find method `setDSTSavings(I)' in type `java.util.SimpleTimeZone'.
Martin Egholm Nielsen
martin@egholm-nielsen.dk
Tue Jun 1 11:11:00 GMT 2004
Hi Michael,
>>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
And if I actually did the 3.4.0 build correct I would have seen that
wasn't the case for 3.4.x... :-)
>>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);
> This method doesnt existed in 3.3.x, in 3.4.0 it does and it works
> here locally with 3.4 cvs branch. You get wrong results with javap
> because it investigates SUN classes and dont uses libgcj.jar.
Doh! Of course, I had to use javap with "bootclasspath" instead...
Lesson learned... :o)
Thanks,
Martin
More information about the Java
mailing list