undefined reference: compiling swt using gcj

Hello guys

I'm trying to make an exe from a java code, using GCJ and SWT

My code is this:

import org.eclipse.swt.SWT;

import org.eclipse.swt.widgets.Display;

import org.eclipse.swt.widgets.MessageBox;

import org.eclipse.swt.widgets.Shell;

publicclass TestExe{

/**

* @param args

*/

publicstaticvoid main(String[] args){

Display display =new Display();

Shell shell =new Shell(display);

MessageBox message =new MessageBox(shell,SWT.OK|

SWT.CANCEL|

SWT.ICON_WARNING);

message.setText("Message from SWT");

message.setMessage("hello");

message.open();

}

}

It is just a simple hello world class using swt...

I compile doing this:

gcj -c -I/cygdrive/f/gcc40-20051104/thisiscool-gcc/swt/win32/3138/swt.jar --classpath=. TestExe.java

gcj --main=TestExe TestExe.o -L/cygdrive/f/gcc40-20051104/thisiscool-gcc/swt/win32/3138 -lswt -o TestExe.exe

and I get the error:

...undefined reference to 'TestExe::class$'

I think I've looked at all the articles on google about how to compile swt with GCJ, but I never find a satisfying answer.

I know there is something wrong in my commands, even if I did a lot of possible combinations...

can someone help me here? I spent to much time looking for the answer, and now I'm tired :-(

Thanks for any help

Philippe

[2036 byte] By [phsansa] at [2007-10-2 19:38:04]
# 1
ditch gcj, it's junk.
jwentinga at 2007-7-13 21:26:41 > top of Java-index,Developer Tools,Java Compiler...
# 2
http://javaCompiler.sf.net
soapy2357a at 2007-7-13 21:26:42 > top of Java-index,Developer Tools,Java Compiler...
# 3

Hi...

You have test this line command for resolution your problem with thisiscool-gcc version 4.0:

i686-pc-mingw32-gcj -s -fjni --main=Automagas -s --classpath D:\thisiscool-gcc\swt\win32\3138\swt.jar -o Automagas.exe Automagas.java -LD:\thisiscool-gcc\swt\win32\3138 -Wl,--whole-archive -Wl,--no-whole-archive -lswt -mwindows

So long!!

Josenildo.

Josenildoa at 2007-7-13 21:26:42 > top of Java-index,Developer Tools,Java Compiler...