我运行下面的程序(下面有原程序列)编译就会出错(出错信息在下面有)但是我重装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

解决方案 »

  1.   

    你的机器上是不是有其它的jdn什么的?
    如装了oracle?
      

  2.   

    查一下配制环境变量path ,classpath 是否正确
      

  3.   

    C:\j2sdk1.4.2_04\bin\javac.exe????
    你到底是在运行程序还是在编译程序阿
      

  4.   

    你把环境变量path下的与jdk的bin相关的路径都删除掉,只保留你的JDK1.4的,应该可以解决
      

  5.   

    你的机子里面有其它低版本的JRE、JDK,而且在系统环境里面设置了缺省路径指向了低版本JDK。因为你是用高版本的JDK编译的,所以在低版本的JRE虚拟机中运行就会抱错
      

  6.   

    如果还解决不了,就到控制面板里面把所有低版本的JRE、JDK都删除了。
      

  7.   

    不要安装太多的编译环境,比如:jdk、jBuilder(自带jdk),这会产生冲突的。只保留一个。
      

  8.   

    装一个jdk,过多的话肯定会有冲突,而且各个厂家的ide有些不一样。