|
发表于 2003-9-21 17:38:36
|
显示全部楼层
BartonZhang
我按照你的方法设置好/etc/profile文件后编译
public class hello{
public static void main(String args[]){
System.out.println("hello");
}
}
可以运行
但是编译
import javax.swing.JOptionPane;
public class Welcome{
public static void main(String args[]){
JOptionPane.showMessageDialog(null, "Welcome\nto\njagva\nprogramming!");
System.exit(0);
}
}
则出现
[root@localhost root]# javac Welcome.java
[root@localhost root]# java Welcome
Exception in thread "main" java.lang.VerifyError: verification failed at PC 123
in javax.swing.JComponent:getListeners((Ljava.lang.Class;)[Ljava.util.EventListener;): incompatible return type
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 0x4025d6b6: java.lang.LinkageError.LinkageError(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x402691b6: java.lang.VerifyError.VerifyError(java.lang.String) (/usr/lib/./libgcj.so.3)
at 0x4023f5a9: _Jv_BytecodeVerifier.verify_fail(byte, int) (/usr/lib/./libgcj.so.3)
at 0x40232c51: _Jv_BytecodeVerifier.verify_instructions_0() (/usr/lib/./libgcj.so.3)
at 0x40231857: _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/./libgcj.so.3)
at 0x40229ae4: _Jv_PrepareClass(java.lang.Class) (/usr/lib/./libgcj.so.3)
at 0x40248028: java.lang.ClassLoader.linkClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
at 0x4025acb3: java.lang.ClassLoader.resolveClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
at 0x402299cb: _Jv_PrepareClass(java.lang.Class) (/usr/lib/./libgcj.so.3)
at 0x40248028: java.lang.ClassLoader.linkClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
at 0x4025acb3: java.lang.ClassLoader.resolveClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
at 0x4024646c: java.lang.Class.initializeClass() (/usr/lib/./libgcj.so.3)
at 0x402296af: _Jv_ResolvePoolEntry(java.lang.Class, int) (/usr/lib/./libgcj.so.3)
at 0x40230827: _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) |
|