[kaffe] SimpleDateFormat failure with kaffe/cvs

Marko Kreen marko at l-t.ee
Thu Dec 23 02:07:35 PST 2004


Following code works with Kaffe from Debian,
jamvm1.2.2 + classpath-cvs, but fails with kaffe-cvs:

-----------
import java.util.Date;
import java.text.SimpleDateFormat;

public class Test2 {
    public static void main(String [] args) {
        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println(f.format(new Date()));
    }
}
-----------

# Kaffe CVS:
$ /opt/java/kaffe/bin/kaffe Test2
java.lang.IllegalArgumentException: Illegal pattern character -1
   at java.text.SimpleDateFormat.formatWithAttribute (SimpleDateFormat.java:539)
   at java.text.SimpleDateFormat.format (SimpleDateFormat.java:557)
   at java.text.DateFormat.format (DateFormat.java:267)
   at Test2.main (Test2.java:7)

# Debian Kaffe 2:1.1.4.PRECVS6-1:
$ kaffe Test2
2004-12-23 11:55:10

# jamvm 1.2.2 + classpath from CVS
$ /opt/java/classpath/bin/jamvm Test2
2004-12-23 11:55:40

--
marko





More information about the kaffe mailing list