This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: SimpleDateFormat
- From: Ben Gardiner <BenGardiner at nanometrics dot ca>
- To: - - <decuplo at yahoo dot com>
- Cc: java at gcc dot gnu dot org
- Date: Thu, 19 Jun 2008 08:52:23 -0400
- Subject: Re: SimpleDateFormat
- References: <799366.17266.qm@web56907.mail.re3.yahoo.com>
- - wrote:
The output with "4.3.0 20080305 (alpha-testing) mingw-20080502" is:
$ snippetCalendar.exe
Test for SimpleDateFormat
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)
at snippetCalendar.main(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)
...7 more
I had this crash with 4.3.0 cross compiled for powerpc; the crash
occurred only when I statically linked my executable with
-static-libgcj. It turned out to be a missing resource. To fix this
problem, I created an archive that had all the *properties*.o objects
from libgcj.a (I called it libgcj_properties.a) and linked it with my
application using '-Wl,--whole-archive -lgcj_properties
-Wl,--no-whole-archive' before the '-static-libgcj'.
If you're not familiar with using 'ar' to extract and pack object files
I'd be happy to send you an example.
,Ben