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 Swing/AWT working on OS X -- article



On Jul 21, 2004, at 7:11 PM, Bryce McKinlay wrote:


John Gabriele wrote:


john$ ./bar
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
<<No stacktrace available>>
Caused by: java.lang.ClassNotFoundException: gnu.java.awt.peer.gtk.GtkToolkit not found in [file:./, core:/]
<<No stacktrace available>>


john$ export CLASSPATH=/usr/local/gcc_cvs/share/java/libgcj-3.5.0.jar

john$ ./bar
false
true
{i.e. it starts up and runs as it should.}


Odd. For some reason the compiled versions of the Gtk AWT peer classes couldn't be found. By putting them on the classpath, you'll be running interpreted bytecode, not natively compiled code. This will reduce performance.

Regards

Bryce


Thanks Bryce.


Should I be adding a '-l' arg to my build command line?
(note, my gnome-related libs are in ~/src/gnome/objdir/lib)
Hmm... here's what that gets me:

~/temp/gcj_stuff $ gcj -o baz --main=TestAWT -l ~/src/gnome/objdir/lib TestAWT.java
/usr/bin/ld: can't locate file for: -l/Users/john/src/gnome/objdir/lib
collect2: ld returned 1 exit status


---J


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