我照教程写了个程序,编译没问题,但一运行就提示有致命错误,具体提示如下:## 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);
}
}
源码是按教程写的,在别的机器上试过,没问题。但为了大家看到更明白也贴出来,如下:
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);
}
}
解决方案 »
- NullpointerException,但没有stacktrace信息?
- JAVA中特殊的乱码,如遇见过吗?
- 杀死进程 线程会不会立刻死掉?
- 高分求助,熟悉jfree的朋友来
- 在一个事务中保存两个表,第二个表要得到第一个表的id值后方能保存,该怎么做?
- 有人在Red hat linux7.3下面用过jxl(Java Excel API)吗?我在Windows下面没问题,Linux下面就不行了。
- JAVA的swtch坑。。。
- 请教:如何添加一个button到frame中,并捕获其点击事件??
- 除了sun的网站,哪里有下载JDK1.4 for linux的地方呀
- 圣诞节没有女友或没有男朋友的朋友们,在来年找个PMM或SGG!!!
- 设置菜单栏和菜单以及菜单项的外观
- 谁能帮我解释一下这个递归方法
上了这个网站看了下,好像是jdk7里面有待于完善的部分,为了jdk7的改进可以去,反映这个问题
程序应该是没有问题。
但是4楼哥们说的那个问题我还真没试过。不知道楼主是不是用的j7?如果是的换成6试试