Compiling SWT+SwingWT

Tom Tromey tromey@redhat.com
Tue Apr 20 18:14:00 GMT 2004


>>>>> "Robin" == Robin Rawson-Tetley <enquiries@sheltermanager.homeip.net> writes:

Robin> I appreciate this is a bit much, but if anyone wants to try this out 
Robin> first hand, you can do an anonymous checkout of the SwingWT source tree 
Robin> at http://sf.net/projects/swingwt and run this script from the bin
Robin> directory.

I gave it a try, but the current CVS SwingWT didn't compile for me,
eg:

    [javac] /tmp/swingwt/SwingWT/swingwt/awt/MenuItem.java:28: cannot resolve symbol
    [javac] symbol  : class MenuShortcut
    [javac] location: class swingwt.awt.MenuItem
    [javac]     protected MenuShortcut shortcut = null;
    [javac]               ^


I did look at your script.  One thing is that you will want to use
`-fjni' when compiling the SWT code.  This option tells gcj that
native methods are implemented using JNI; in this case gcj will emit
stub implementations that know how to call the runtime to get JNI
info.  Without this, gcj will assume CNI and will generate symbolic
references -- so this could be a cause of the problem you are seeing.

If that doesn't help, let us know.  Send the actual error output (or
some big-enough clip from it) so it is easier to investigate more.

SwingWT is a cool project BTW.

Tom



More information about the Java mailing list