|
我在linux下编写java程序时,只要是有图形界面的程序在编译时都会出错:
Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
at 0x40268e17: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x4025bc8e: java.lang.Error.Error(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x40329582: java.awt.AWTError.AWTError(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x40340c9d: java.awt.Toolkit.getDefaultToolkit() (/usr/lib/./libgcj.so.3)
at 0x4034146e: java.awt.Window.getToolkit() (/usr/lib/./libgcj.so.3)
at 0x40332068: java.awt.Container.addImpl(java.awt.Component, java.lang.Object, int) (/usr/lib/./libgcj.so.3)
at 0x40331e85: java.awt.Container.add(java.awt.Component) (/usr/lib/./libgcj.so.3)
at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
at 0x402306e8: _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
at 0x40230ff4: _Jv_InterpMethod.run(ffi_cif, void, ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
at 0x4022e504: _Jv_InterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
at 0x4038305c: ?? (??:0)
at 0x40242dd8: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/./libgcj.so.3)
at 0x402ad02d: gnu.gcj.runtime.FirstThread.run() (/usr/lib/./libgcj.so.3)
at 0x4024fc4c: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/./libgcj.so.3)
at 0x4021c8ac: _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/./libgcj.so.3)
at 0x08048910: ?? (??:0)
at 0x42015574: __libc_start_main (/lib/tls/libc.so.6)
at 0x080486c1: ?? (??:0)
linux新手+java新手,请各位大侠和高手帮忙. 谢! |
|