我照教程写了个程序,编译没问题,但一运行就提示有致命错误,具体提示如下:## A fatal error has been detected by the Java Runtime Environment:## EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x746905c7, pid=492, tid=1788## JRE version: 7.0_05-b06# Java VM: Java HotSpot(TM) Client VM (23.1-b03 mixed mode, sharing windows-x86 )# Problematic frame:# C [MSCTF.dll+0x105c7] TF_DllDetachInOther+0x12e5## Failed to write core dump. Minidumps are not enabled by default on client versions of Windows## If you would like to submit a bug report, please visit:# http://bugreport.sun.com/bugreport/crash.jsp# The crash happened outside the Java Virtual Machine in native code.# See problematic frame for where to report the bug.
源码是按教程写的,在别的机器上试过,没问题。但为了大家看到更明白也贴出来,如下:
package com.rong.test;
import java.awt.*;public class MyFrame extends Frame {
public static void main(String[] args) {
   new MyFrame().launchFrame();
        }
public void paint(Graphics g) {
          g.setColor(Color.BLUE);
  g.fillOval(30, 30, 50, 50);
}
        public void launchFrame() {  
           this.setBounds(400, 400, 300, 300);
           this.setVisible(true);
        }
}

解决方案 »

  1.   

    官网上下载一个jdk,换掉原来的试试
      

  2.   

    我用的jdk就是从官网上下的。
      

  3.   

    而且,后来又下了好几个jdk,都一样,最后又换回来,就是官网上下的那个,结果还是不行
      

  4.   

    http://bugreport.sun.com/bugreport/crash.jsp
    上了这个网站看了下,好像是jdk7里面有待于完善的部分,为了jdk7的改进可以去,反映这个问题
      

  5.   

    我在我的eclipse种运行没有问题。
    程序应该是没有问题。
    但是4楼哥们说的那个问题我还真没试过。不知道楼主是不是用的j7?如果是的换成6试试
      

  6.   

    最后我用了jdk5.0,程序就可以运行了。但这也不应该是jdk7.0的问题,因为在别人jdk7.0的机子上是可以运行的,真不知道是什么问题。我英文怎么好,用翻译工具翻译了看提示也不大懂。有谁英文好,能看出是怎么回事的,请帮忙解释一下,虽然现在我可以用5.0,但我总不能以后总用5.0么。