Test case:
I created a file Test.java as follows:
 public class Test
 {
  public static void main(String args[])
  {
    System.out.println("This is a test.");
  }
 }
and compiled it by running:
   gcj --main=Test -o test.exe Test.java
and file test.exe appeared but when I ran it, it produced no output -
  it just immediately quits.
I uploaded it to my site and so
you can get this file at http://www.gameofbeads.com/files/test.exe (3.4 Mb)

Additional tests:
  I made a simple program in test.cpp to do the same in cpp
#include <stdio.h>
int main(int argc,char *argv[]) 
{
  printf("This is a cpp test!");
  return 0;
}
and compiled it with gcc -o test.exe test.cpp and it produced output
   This is a cpp test!
So, the main part of mingw works correctly.
I also made a more complicated program in java:
import java.io.*;
public class c  {
  public static void main (String args[]) {
       try {
          FileOutputStream fout = new FileOutputStream("vov.txt");
          fout.write(45);
          fout.close();
          System.out.println("!!Completed!!");        
       }
       catch (Exception e) {
         e.printStackTrace();
       }
  }
}
and compiled it: gcj --main=c -o c.exe c.java
and the compiler made c.exe (3.4 Mb)
when I ran it, it immediately quitted, and it neither created vov.txt
nor produced output.
 

My parameters:
Windows XP
GCC: Reading specs from E:/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)
BINUTILS: GNU ld (GNU Binutils) 2.20
MINGW: 5.1.6
Environment to run programs: FAR