Bug 150453 - AWT peer not found when executing Java code
AWT peer not found when executing Java code
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
powerpc Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2005-03-06 21:39 EST by W. Michael Petullo
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 4.0.0-0.32
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-10 04:05:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description W. Michael Petullo 2005-03-06 21:39:04 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20050109 Epiphany/1.5.6

Description of problem:
The GTK AWT peer does not seem to be installed correctly.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Try to execute a Java application that uses AWT.

Actual Results:  [mike@imp ~]$ gij -jar gui.jar
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
   at java.awt.Toolkit.getDefaultToolkit() (/usr/lib/libgcj.so.6.0.0)
   at java.awt.Window.getToolkit() (/usr/lib/libgcj.so.6.0.0)
   at java.awt.Frame.addNotify() (/usr/lib/libgcj.so.6.0.0)
   at java.awt.Window.pack() (/usr/lib/libgcj.so.6.0.0)
   at dmumaugh.teaching.stock.StockWatchGUI.StockWatchGUI() (Unknown Source)
   at dmumaugh.teaching.stock.StockWatchGUI.main(java.lang.String[]) (Unknown Source)
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Caused by: java.lang.ClassNotFoundException: gnu.java.awt.peer.gtk.GtkToolkit not found in gnu.gcj.runtime.SystemClassLoader{urls=[], parent=gnu.gcj.runtime.VMClassLoader{urls=[file:/usr/share/java/ext/com-sun-tools-doclets-Taglet-0.7.1.jar], parent=null}}
   at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
   at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.6.0.0)
   at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.6.0.0)
   at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.6.0.0)
   at java.awt.Toolkit.getDefaultToolkit() (/usr/lib/libgcj.so.6.0.0)
   ...7 more

Expected Results:  Previous versions from Raw Hide would execute simple AWT applications.

Additional info:
Comment 2 Thomas Fitzsimmons 2005-03-07 12:01:15 EST
Use this as a workaround:

export LD_LIBRARY_PATH=/usr/lib/gcc/i386-redhat-linux/4.0.0

It seems that gij isn't looking in the version-specific sub-directory for these
shared objects.
Comment 5 Jakub Jelinek 2005-03-10 04:05:09 EST
Should be fixed in gcc-4.0.0-0.32.

Note You need to log in before you can comment on or make changes to this bug.