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]

SimpleDateFormat


Hi,
I run the following piece of code.


-----------------------
Calendar datai;
datai = Calendar.getInstance();
datai.set(1899, 11, 30, 0, 0); // start time for delphi 
SimpleDateFormat sdf = new SimpleDateFormat();
System.out.println("datai:"+ sdf.format(datai.getTime()));
------------------------


It crash with gcj version:
gcj.exe (GCC) 4.3.0 20080305 (alpha-testing) mingw-20080502

error is:
Exception in thread "main" java.lang.ExceptionInInitializerError
   at java.lang.Class.initializeClass(fake:0)
   at java.util.Currency.getInstance(fake:0)
   at java.text.DecimalFormatSymbols.<init>(fake:0)
   at java.text.DecimalFormatSymbols.getInstance(fake:0)
   at java.text.NumberFormat.computeInstance(fake:0)
   at java.text.NumberFormat.getNumberInstance(fake:0)
   at java.text.SimpleDateFormat.<init>(fake:0)

.....
Caused by: java.lang.NullPointerException
   at java.io.InputStreamReader.read(fake:0)
   at java.io.BufferedReader.fill(fake:0)
   at java.io.BufferedReader.readLine(fake:0)
   at java.util.Properties.load(fake:0)
   at java.util.Currency.<clinit>(fake:0)
   at java.lang.Class.initializeClass(fake:0)
   ...13 more



There is no error with eclipse and with:
gcj.exe (GCC) 3.4.5 (mingw-vista special r3)


How we can understand if it is a gcj problem or a mingw problem?

x10




      


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