其怪的是我在执行这个句子的时候,输入的数不能小于9,否则就产生以下的错误报告
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c921010, pid=672, tid=4072
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_03-b07 mixed mode)
# Problematic frame:
# C [ntdll.dll+0x1010]
#
--------------- T H R E A D ---------------
Current thread (0x0083f4e0): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=4072]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000018
Registers:
EAX=0x00000004, EBX=0x07179870, ECX=0x7ffd3000, EDX=0x00000004
ESP=0x0b31f5b0, EBP=0x0b31f5c8, ESI=0x00000000, EDI=0x0b3e2350
EIP=0x7c921010, EFLAGS=0x00010246
Top of Stack: (sp=0x0b31f5b0)
0x0b31f5b0: 73575a16 00000004 0b3e2374 7354139f
0x0b31f5c0: 0b3e2374 0b3e2350 0b31f5d8 73542c5d
0x0b31f5d0: 0b3e2374 0083f59c 0b31f5ec 73545fa0
0x0b31f5e0: 0b3e2350 73570000 00000000 0b31f608
0x0b31f5f0: 7354740e 0b3e2350 0b31f628 00000003
0x0b31f600: 00883bf0 0083f59c 0b31f620 6d3e11da
0x0b31f610: 0b3e2350 0b31f628 0083f4e0 07179870
0x0b31f620: 0b31f658 00bd826f 00000000 0b31f674
Instructions: (pc=0x7c921010)
0x7c921000: 90 90 90 90 90 64 8b 0d 18 00 00 00 8b 54 24 04
0x7c921010: 83 7a 14 00 75 4f f0 ff 42 04 75 19 8b 41 24 89
Stack: [0x0b2e0000,0x0b320000), sp=0x0b31f5b0, free space=253k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [ntdll.dll+0x1010]
C [ODBC32.dll+0x2c5d]
C [ODBC32.dll+0x5fa0]
C [ODBC32.dll+0x740e]
C [JdbcOdbc.dll+0x11da]
j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
j sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
j card.getPanel.jButton1_actionPerformed(Ljava/awt/event/ActionEvent;)V+55
j card.getPanel$2.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
j javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
j javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
j javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
j javax.swing.DefaultButtonModel.setPressed(Z)V+117
j javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
j java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
j javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
j java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
j java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
j java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+477
j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
J java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
j java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+12
j java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+19
j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46
j java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+233
j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j java.awt.EventDispatchThread.run()V+9
v ~StubRoutines::call_stub
V [jvm.dll+0x818b8]
V [jvm.dll+0xd431d]
V [jvm.dll+0x81789]
V [jvm.dll+0x814e6]
V [jvm.dll+0x9c06b]
V [jvm.dll+0xfe7f5]
V [jvm.dll+0xfe7c3]
C [MSVCRT.dll+0x2a3b0]
C [kernel32.dll+0xb50b]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.jdbc.odbc.JdbcOdbc.allocStmt(J[B)J+0
j sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(J)J+47
j sun.jdbc.odbc.JdbcOdbcConnection.createStatement(II)Ljava/sql/Statement;+27
j sun.jdbc.odbc.JdbcOdbcConnection.createStatement()Ljava/sql/Statement;+7
j card.getPanel.jButton1_actionPerformed(Ljava/awt/event/ActionEvent;)V+55
j card.getPanel$2.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
j javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
j javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
j javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
j javax.swing.DefaultButtonModel.setPressed(Z)V+117
j javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
j java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
j javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
j java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
j java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
j java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+477
j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
J java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V
v ~RuntimeStub::alignment_frame_return Runtime1 stub
j java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
j java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+12
j java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+19
j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46
j java.awt.EventDispatchThread.pumpOneEventForHierarchy(ILjava/awt/Component;)Z+233
j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+26
j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
j java.awt.EventDispatchThread.run()V+9
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0085e040 JavaThread "TimerQueue" daemon [_thread_blocked, id=1656]
0x00848250 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=4076]
0x00840820 JavaThread "DestroyJavaVM" [_thread_blocked, id=3492]
=>0x0083f4e0 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=4072]
0x0083b010 JavaThread "AWT-Windows" daemon [_thread_in_native, id=4020]
0x0083b530 JavaThread "AWT-Shutdown" [_thread_blocked, id=1740]
0x00831e80 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3984]
0x0082f610 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3980]
0x0082e400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3664]
0x0082d820 JavaThread "Finalizer" daemon [_thread_blocked, id=1776]
0x0082c520 JavaThread "Reference Handler" daemon [_thread_blocked, id=1608]
Other Threads:
0x0082b7b0 VMThread [id=3976]
0x00832b60 WatcherThread [id=3992]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 576K, used 86K [0x02bd0000, 0x02c70000, 0x030b0000)
eden space 512K, 4% used [0x02bd0000, 0x02bd5890, 0x02c50000)
from space 64K, 100% used [0x02c50000, 0x02c60000, 0x02c60000)
to space 64K, 0% used [0x02c60000, 0x02c60000, 0x02c70000)
tenured generation total 4384K, used 4369K [0x030b0000, 0x034f8000, 0x06bd0000)
the space 4384K, 99% used [0x030b0000, 0x034f4770, 0x034f4800, 0x034f8000)
compacting perm gen total 8448K, used 8423K [0x06bd0000, 0x07410000, 0x0abd0000)
the space 8448K, 99% used [0x06bd0000, 0x07409da0, 0x07409e00, 0x07410000)
No shared spaces configured.
Dynamic libraries:
0x00400000 - 0x0040c000 D:\jbuilder\jdk1.5\bin\javaw.exe
0x7c920000 - 0x7c9b4000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c91c000 C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e49000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e50000 - 0x77ee1000 C:\WINDOWS\system32\RPCRT4.dll
0x77d10000 - 0x77d9f000 C:\WINDOWS\system32\USER32.dll
0x77ef0000 - 0x77f37000 C:\WINDOWS\system32\GDI32.dll
0x77be0000 - 0x77c38000 C:\WINDOWS\system32\MSVCRT.dll
0x76300000 - 0x7631d000 C:\WINDOWS\system32\IMM32.DLL
0x62c20000 - 0x62c29000 C:\WINDOWS\system32\LPK.DLL
0x73fa0000 - 0x7400b000 C:\WINDOWS\system32\USP10.dll
0x6d6b0000 - 0x6d836000 D:\jbuilder\jdk1.5\jre\bin\client\jvm.dll
0x76b10000 - 0x76b3a000 C:\WINDOWS\system32\WINMM.dll
0x6d2f0000 - 0x6d2f8000 D:\jbuilder\jdk1.5\jre\bin\hpi.dll
0x76bc0000 - 0x76bcb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d680000 - 0x6d68c000 D:\jbuilder\jdk1.5\jre\bin\verify.dll
0x6d370000 - 0x6d38d000 D:\jbuilder\jdk1.5\jre\bin\java.dll
0x6d6a0000 - 0x6d6af000 D:\jbuilder\jdk1.5\jre\bin\zip.dll
0x6d070000 - 0x6d1d7000 D:\jbuilder\jdk1.5\jre\bin\awt.dll
0x72f70000 - 0x72f96000 C:\WINDOWS\system32\WINSPOOL.DRV
0x76990000 - 0x76acd000 C:\WINDOWS\system32\ole32.dll
0x5adc0000 - 0x5adf7000 C:\WINDOWS\system32\uxtheme.dll
0x736d0000 - 0x73719000 C:\WINDOWS\system32\ddraw.dll
0x73b30000 - 0x73b36000 C:\WINDOWS\system32\DCIMAN32.dll
0x738b0000 - 0x73980000 C:\WINDOWS\system32\D3DIM700.DLL
0x53000000 - 0x53008000 C:\PROGRA~1\Yahoo!\ASSIST~1\Yhelper.dll
0x77f40000 - 0x77fb6000 C:\WINDOWS\system32\SHLWAPI.dll
0x5d170000 - 0x5d207000 C:\WINDOWS\system32\COMCTL32.dll
0x37210000 - 0x3727b000 C:\WINDOWS\downlo~1\CnsMin.dll
0x76c60000 - 0x76c88000 C:\WINDOWS\system32\imagehlp.dll
0x5fdd0000 - 0x5fe24000 C:\WINDOWS\system32\NETAPI32.dll
0x77bd0000 - 0x77bd8000 C:\WINDOWS\system32\VERSION.dll
0x76d70000 - 0x76d92000 C:\WINDOWS\system32\apphelp.dll
0x73640000 - 0x7366e000 C:\WINDOWS\system32\msctfime.ime
0x0b190000 - 0x0b1bd000 C:\WINDOWS\system32\JPWB.IME
0x76320000 - 0x76367000 C:\WINDOWS\system32\comdlg32.dll
0x7d590000 - 0x7dd82000 C:\WINDOWS\system32\SHELL32.dll
0x77180000 - 0x77282000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
0x6d2b0000 - 0x6d2ed000 D:\jbuilder\jdk1.5\jre\bin\fontmanager.dll
0x6d530000 - 0x6d543000 D:\jbuilder\jdk1.5\jre\bin\net.dll
0x71a20000 - 0x71a37000 C:\WINDOWS\system32\WS2_32.dll
0x71a10000 - 0x71a18000 C:\WINDOWS\system32\WS2HELP.dll
0x6d550000 - 0x6d559000 D:\jbuilder\jdk1.5\jre\bin\nio.dll
0x6d430000 - 0x6d44f000 D:\jbuilder\jdk1.5\jre\bin\jpeg.dll
0x6d3e0000 - 0x6d3ed000 D:\jbuilder\jdk1.5\jre\bin\JdbcOdbc.dll
0x73540000 - 0x7357d000 C:\WINDOWS\system32\ODBC32.dll
0x20000000 - 0x20017000 C:\WINDOWS\system32\odbcint.dll
0x4aac0000 - 0x4ab04000 C:\WINDOWS\system32\odbcjt32.dll
0x1b000000 - 0x1b170000 C:\WINDOWS\system32\msjet40.dll
0x1b5d0000 - 0x1b665000 C:\WINDOWS\system32\mswstr10.dll
0x770f0000 - 0x7717c000 C:\WINDOWS\system32\OLEAUT32.dll
0x4b4e0000 - 0x4b4ee000 C:\WINDOWS\system32\odbcji32.dll
0x1b2c0000 - 0x1b2cd000 C:\WINDOWS\system32\msjter40.dll
0x1b2d0000 - 0x1b2f6000 C:\WINDOWS\system32\MSJINT40.DLL
0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll
0x10340000 - 0x10889000 C:\WINDOWS\system32\xpsp2res.dll
0x76fa0000 - 0x7701f000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77020000 - 0x770ba000 C:\WINDOWS\system32\COMRes.dll
0x1b810000 - 0x1b84a000 C:\WINDOWS\system32\msjtes40.dll
0x0b380000 - 0x0b38b000 C:\WINDOWS\system32\VBAJET32.DLL
0x19950000 - 0x199b2000 C:\WINDOWS\system32\expsrv.dll
VM Arguments:
java_command: card.creditCard
Environment Variables:
CLASSPATH=E:\javaexamples164\代码\book;C:\Program Files\Java\j2re1.4.2_09\lib\ext\QTJava.zip
PATH=.;D:\jbuilder\bin;D:\jbuilder\jdk1.5\bin;C:\j2sdk1.4.2_09\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\QuickTime\QTSystem\;D:\jbuilder\debug\sa;D:\jbuilder\lib
USERNAME=yfz
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 1 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht
Memory: 4k page, physical 522740k(114312k free), swap 1275640k(870572k free)
vm_info: Java HotSpot(TM) Client VM (1.5.0_03-b07) for windows-x86, built on Apr 13 2005 02:07:01 by "java_re" with MS VC++ 6.0