This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCJ and Swing


Ivan Ivanov wrote:
[...]
> I am trying to compile it with 
> gcj LabelDialog.java
> the following error is outputed
> 
> /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/../../../crt1.o(.text+0x18):
> In function `_start':
> : undefined reference to `main'
> collect2: ld returned 1 exit status

I guess you would have already discovered that
the proper way is to additionally specify the main
Java class like so:

  gcj --main=LabelDialog LabelDialog.java


> When I try to make an executable file and run it I
> receive the following error 
> 
> Exception in thread "main" java.lang.Error: not
> implemented
>    at javax.swing.UIDefaults.put(java.lang.Object,
> java.lang.Object) (/usr/lib/libgcj.so.4.0.0)

This means that this method (javax.swing.UIDefaults.put( ))
was intentionally left unimplemented in 3.3.3.

Only recently has AWT/Swing implementation work really
picked up steam. This work will appear in what will most
likely be released as GCC 3.5.0. In the mean time, if
you're eager to see the work in progress, you can
check out the GCC CVS, in particular the java-gui
branch, and build GCJ for yourself.

You work should be considerably simplified by the modified
JHBuild system for GCJ AWT/Swing development as provided
by Thomas Fitzsimmons:

  http://people.redhat.com/fitzsim/gcj-and-jhbuild.html

Of course, you can also check stuff out yourself and
build everything but you must know that (as far as I can
tell) only the Gtk peers provide the maximum available
functionality.

HTH,
Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT gmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]