Bug 150453 - AWT peer not found when executing Java code
Summary: AWT peer not found when executing Java code
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc   
(Show other bugs)
Version: rawhide
Hardware: powerpc
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-03-07 02:39 UTC by W. Michael Petullo
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

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

Attachments (Terms of Use)

Description W. Michael Petullo 2005-03-07 02:39:04 UTC
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 17:01:15 UTC
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 09:05:09 UTC
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.