我运行下面的程序(下面有原程序列)编译就会出错(出错信息在下面有)但是我重装JDK1 1.4以后就能运行了,但是关机以后,开机后我重新运程序就又会出现同样的错误,我删了JDK重装后又能运行,现在我得天天重装JDK才能运行,但是像HELLOWORLD那样的程序不重装也能运行和编译。
原代码如下
**
@version 1.32 2004-05-04
@author Cay Horstmann
*/import java.awt.*;
import java.awt.event.*;
import javax.swing.*;public class ButtonTest
{
public static void main(String[]args)
{
ButtonFrame frame = new ButtonFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
}
}/**
A frame with a button panel
*/
class ButtonFrame extends JFrame
{
public ButtonFrame()
{
setTitle("ButtonTest");
setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); // add panel to frame
Container contentpane=getContentPane(); ButtonPanel panel = new ButtonPanel();
contentpane.add(panel);
} public static final int DEFAULT_WIDTH = 300;
public static final int DEFAULT_HEIGHT = 200;
}/**
A panel with three buttons.
*/
class ButtonPanel extends JPanel
{
public ButtonPanel()
{
// create buttons JButton yellowButton = new JButton("Yellow");
JButton blueButton = new JButton("Blue");
JButton redButton = new JButton("Red"); // add buttons to panel add(yellowButton);
add(blueButton);
add(redButton); // create button actions ColorAction yellowAction = new ColorAction(Color.YELLOW);
ColorAction blueAction = new ColorAction(Color.BLUE);
ColorAction redAction = new ColorAction(Color.RED); // associate actions with buttons yellowButton.addActionListener(yellowAction);
blueButton.addActionListener(blueAction);
redButton.addActionListener(redAction);
} /**
An action listener that sets the panel's background color.
*/
private class ColorAction implements ActionListener
{
public ColorAction(Color c)
{
backgroundColor = c;
} public void actionPerformed(ActionEvent event)
{
setBackground(backgroundColor);
} private Color backgroundColor;
}
}错误信息如下
Unexpected Signal : EXCEPTION_FLT_STACK_CHECK (0xc0000092) occurred at PC=0xC9D152
Function=[Unknown.]
Library=(N/A)NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:Dynamic libraries:
0x00400000 - 0x00408000 C:\j2sdk1.4.2_04\bin\javac.exe
0x77F50000 - 0x77FDB000 C:\WINDOWS\System32\ntdll.dll
0x77E40000 - 0x77F4E000 C:\WINDOWS\system32\kernel32.dll
0x77DA0000 - 0x77E3B000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll
0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll
0x002D0000 - 0x00344000 C:\DOCUME~1\blb\LOCALS~1\Temp\taa11D.tmp
0x77310000 - 0x7739B000 C:\WINDOWS\system32\COMCTL32.DLL
0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll
0x77D10000 - 0x77D9B000 C:\WINDOWS\system32\USER32.dll
0x71A90000 - 0x71AA1000 C:\WINDOWS\system32\MPR.DLL
0x77180000 - 0x772A1000 C:\WINDOWS\system32\OLE32.DLL
0x770F0000 - 0x7717B000 C:\WINDOWS\system32\OLEAUT32.DLL
0x71A40000 - 0x71A4A000 C:\WINDOWS\System32\WSOCK32.DLL
0x71A20000 - 0x71A35000 C:\WINDOWS\System32\WS2_32.dll
0x71A10000 - 0x71A18000 C:\WINDOWS\System32\WS2HELP.dll
0x76300000 - 0x7631C000 C:\WINDOWS\System32\IMM32.DLL
0x62C20000 - 0x62C28000 C:\WINDOWS\System32\LPK.DLL
0x72F10000 - 0x72F6A000 C:\WINDOWS\System32\USP10.dll
0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll
0x76B10000 - 0x76B39000 C:\WINDOWS\System32\WINMM.dll
0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll
0x003A0000 - 0x003AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll
0x003B0000 - 0x003C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll
0x003D0000 - 0x003DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll
0x76C60000 - 0x76C82000 C:\WINDOWS\system32\imagehlp.dll
0x6D8A0000 - 0x6D91D000 C:\WINDOWS\system32\DBGHELP.dll
0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll
0x76BC0000 - 0x76BCB000 C:\WINDOWS\System32\PSAPI.DLLHeap at VM Abort:
Heap
def new generation total 576K, used 281K [0x10010000, 0x100b0000, 0x104f0000)
eden****************
Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC = 0x00c9d152
SIGNAL = -1073741678
FUNCTION NAME = (N/A)
OFFSET = 0xFFFFFFFF
LIBRARY NAME = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.Tool completed with exit code 1
原代码如下
**
@version 1.32 2004-05-04
@author Cay Horstmann
*/import java.awt.*;
import java.awt.event.*;
import javax.swing.*;public class ButtonTest
{
public static void main(String[]args)
{
ButtonFrame frame = new ButtonFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.show();
}
}/**
A frame with a button panel
*/
class ButtonFrame extends JFrame
{
public ButtonFrame()
{
setTitle("ButtonTest");
setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT); // add panel to frame
Container contentpane=getContentPane(); ButtonPanel panel = new ButtonPanel();
contentpane.add(panel);
} public static final int DEFAULT_WIDTH = 300;
public static final int DEFAULT_HEIGHT = 200;
}/**
A panel with three buttons.
*/
class ButtonPanel extends JPanel
{
public ButtonPanel()
{
// create buttons JButton yellowButton = new JButton("Yellow");
JButton blueButton = new JButton("Blue");
JButton redButton = new JButton("Red"); // add buttons to panel add(yellowButton);
add(blueButton);
add(redButton); // create button actions ColorAction yellowAction = new ColorAction(Color.YELLOW);
ColorAction blueAction = new ColorAction(Color.BLUE);
ColorAction redAction = new ColorAction(Color.RED); // associate actions with buttons yellowButton.addActionListener(yellowAction);
blueButton.addActionListener(blueAction);
redButton.addActionListener(redAction);
} /**
An action listener that sets the panel's background color.
*/
private class ColorAction implements ActionListener
{
public ColorAction(Color c)
{
backgroundColor = c;
} public void actionPerformed(ActionEvent event)
{
setBackground(backgroundColor);
} private Color backgroundColor;
}
}错误信息如下
Unexpected Signal : EXCEPTION_FLT_STACK_CHECK (0xc0000092) occurred at PC=0xC9D152
Function=[Unknown.]
Library=(N/A)NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:Dynamic libraries:
0x00400000 - 0x00408000 C:\j2sdk1.4.2_04\bin\javac.exe
0x77F50000 - 0x77FDB000 C:\WINDOWS\System32\ntdll.dll
0x77E40000 - 0x77F4E000 C:\WINDOWS\system32\kernel32.dll
0x77DA0000 - 0x77E3B000 C:\WINDOWS\system32\ADVAPI32.dll
0x78000000 - 0x78086000 C:\WINDOWS\system32\RPCRT4.dll
0x77BE0000 - 0x77C33000 C:\WINDOWS\system32\MSVCRT.dll
0x002D0000 - 0x00344000 C:\DOCUME~1\blb\LOCALS~1\Temp\taa11D.tmp
0x77310000 - 0x7739B000 C:\WINDOWS\system32\COMCTL32.DLL
0x77C40000 - 0x77C80000 C:\WINDOWS\system32\GDI32.dll
0x77D10000 - 0x77D9B000 C:\WINDOWS\system32\USER32.dll
0x71A90000 - 0x71AA1000 C:\WINDOWS\system32\MPR.DLL
0x77180000 - 0x772A1000 C:\WINDOWS\system32\OLE32.DLL
0x770F0000 - 0x7717B000 C:\WINDOWS\system32\OLEAUT32.DLL
0x71A40000 - 0x71A4A000 C:\WINDOWS\System32\WSOCK32.DLL
0x71A20000 - 0x71A35000 C:\WINDOWS\System32\WS2_32.dll
0x71A10000 - 0x71A18000 C:\WINDOWS\System32\WS2HELP.dll
0x76300000 - 0x7631C000 C:\WINDOWS\System32\IMM32.DLL
0x62C20000 - 0x62C28000 C:\WINDOWS\System32\LPK.DLL
0x72F10000 - 0x72F6A000 C:\WINDOWS\System32\USP10.dll
0x08000000 - 0x08138000 C:\j2sdk1.4.2_04\jre\bin\client\jvm.dll
0x76B10000 - 0x76B39000 C:\WINDOWS\System32\WINMM.dll
0x10000000 - 0x10007000 C:\j2sdk1.4.2_04\jre\bin\hpi.dll
0x003A0000 - 0x003AE000 C:\j2sdk1.4.2_04\jre\bin\verify.dll
0x003B0000 - 0x003C9000 C:\j2sdk1.4.2_04\jre\bin\java.dll
0x003D0000 - 0x003DD000 C:\j2sdk1.4.2_04\jre\bin\zip.dll
0x76C60000 - 0x76C82000 C:\WINDOWS\system32\imagehlp.dll
0x6D8A0000 - 0x6D91D000 C:\WINDOWS\system32\DBGHELP.dll
0x77BD0000 - 0x77BD7000 C:\WINDOWS\system32\VERSION.dll
0x76BC0000 - 0x76BCB000 C:\WINDOWS\System32\PSAPI.DLLHeap at VM Abort:
Heap
def new generation total 576K, used 281K [0x10010000, 0x100b0000, 0x104f0000)
eden****************
Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC = 0x00c9d152
SIGNAL = -1073741678
FUNCTION NAME = (N/A)
OFFSET = 0xFFFFFFFF
LIBRARY NAME = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.Tool completed with exit code 1
解决方案 »
- 请教一个乱码问题
- JAVA的图形界面需要学习吗(SWING,AWT,APPLET)!我想往J2EE发展,学习到什么时候才能开始学习J2EE!
- 有了jBuilder还用学习窗口布局等相关语句怎么写吗?
- 这种写法好吗?问一个编码规范方面的
- a difficult problem for me, maybe not for you. ???
- unicode & 多语言???
- 谁能讲的明白就送分,共同探讨一下关于static。
- 紧急求助:关于文本的实时监控问题
- 在程序中,怎样根据一个字符串,调用相关的类?
- 调用构造方法时,JVM内存分配问题?
- 小弟初学java,请教一个 ASCII 码的问题,谢谢!
- 小弟现想学python,希望兄弟们推荐一本好书,万分感谢!!
如装了oracle?
你到底是在运行程序还是在编译程序阿