I can create java executables for Ubuntu.  However, when I try to use MinGW I cannot get an exe created with gcj to correctly execute.  The program seg fault.  I reinstalled MinGW (using MinGW-5.1.4.exe), libiconv and gdb 30 minutes ago and re-ran the test java program:
 
 public class Test
{
  public static void main(String args[])
  {
    System.out.println("This is a test.");
  }
}
Here is the version information:
>gcc -v
Reading specs from f:/mingw/bin/../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld --wi
th-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --dis
able-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --d
isable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --with
out-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enabl
e-hash-synchronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special r3)
 
>ld -v
GNU ld (GNU Binutils) 2.19.1
 
I used make (after copying and renaming mingw32-make.exe as make.exe) and  this makefile that I created and successfully used with the Ubuntu version of gcj:
%: %.java
        gcj -Wall -O3 --main=$@ -o$@ $^
CheckerBoardViewer:  CheckerBoardViewer.java CheckerBoardComponent.java
        gcj -Wall -O3 --main=$@ -o$@ $^
 
>gdb Test
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) run
Starting program: F:\GCJ/Test.exe
 
Program received signal SIGSEGV, Segmentation fault.
0x0040221a in _Jv_AllocPtrFreeObject ()
(gdb) backtrace
#0  0x0040221a in _Jv_AllocPtrFreeObject ()
#1  0x004348c6 in _Jv_AllocString ()
#2  0x00434d98 in _Jv_NewStringUTF ()
#3  0x004080fd in java::lang::Class::getName() ()
#4  0x0040ae98 in java::lang::Class::initializeClass() ()
#5  0x00402222 in _Jv_AllocPtrFreeObject ()
#6  0x004348c6 in _Jv_AllocString ()
#7  0x00434d98 in _Jv_NewStringUTF ()
#8  0x004080fd in java::lang::Class::getName() ()
#9  0x0040ae98 in java::lang::Class::initializeClass() ()
#10 0x00402222 in _Jv_AllocPtrFreeObject ()
#11 0x004348c6 in _Jv_AllocString ()
#12 0x00434d98 in _Jv_NewStringUTF ()
#13 0x004080fd in java::lang::Class::getName() ()
#14 0x0040ae98 in java::lang::Class::initializeClass() ()
#15 0x00402222 in _Jv_AllocPtrFreeObject ()
#16 0x004348c6 in _Jv_AllocString ()
#17 0x00434d98 in _Jv_NewStringUTF ()
#18 0x004080fd in java::lang::Class::getName() ()
#19 0x0040ae98 in java::lang::Class::initializeClass() ()
#20 0x00402222 in _Jv_AllocPtrFreeObject ()
#21 0x004348c6 in _Jv_AllocString ()
#22 0x00434d98 in _Jv_NewStringUTF ()
---Type <return> to continue, or q <return> to quit---
 
>>I hit return and got up to 20000 or so before I gave up and quit.
 
Do I need additional libraries or parameters to correctly run a java executable?