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

Michael Koch konqueror@gmx.de
Tue Jun 1 10:14:00 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Dienstag, 1. Juni 2004 11:41 schrieb Martin Egholm Nielsen:
> 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?

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.
Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAvFccWSOgCCdjSDsRAm6HAJoDpU46hokjC/amnEseZOYuL7KJOACgj5/j
Se9a5MpLaUOIXEC4RyJtAsI=
=/RPk
-----END PGP SIGNATURE-----


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /