报错如下:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c921010, pid=2740, tid=1400
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_11-b03 mixed mode, sharing)
# Problematic frame:
# C [ntdll.dll+0x1010]
#
# An error report file with more information is saved as hs_err_pid2740.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
在线等!!!
我先谢谢各位高手啦!!!
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c921010, pid=2740, tid=1400
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_11-b03 mixed mode, sharing)
# Problematic frame:
# C [ntdll.dll+0x1010]
#
# An error report file with more information is saved as hs_err_pid2740.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
在线等!!!
我先谢谢各位高手啦!!!
The applet or application that you were running may contain programming errors or bugs that caused the JVM to crash.
You may be running an older version of the Java Runtime Environment (JRE) which contains bugs that can cause the JVM to crash.
http://www.freebsdchina.org/forum/viewtopic.php?p=187128&sid=4cd8bad256580c10b582c7fcaaea666b
你运行的applet或者应用程序可能包含程序的错误或异常,从而导致JVM崩溃
You may be running an older version of the Java Runtime Environment (JRE) which contains bugs that can cause the JVM to crash.
你可能运行了一个旧的包含Bug的JRE环境,从而导致JVM崩溃所以
1.检查一下你的程序,跟踪一下,看是否有异常
2.综合你的操作系统和JRE环境(JDK环境),是否不兼容.打个比方,你如果将一个用于windows95的程序拿到windowsXP下用,有时候是行不通的
我查了程序,有个方法update是我写的更新数据库的方法,单独调试时是可行的,但是只要在程序中把这个方法注释掉就可以啦,但这个方法我必须要用,我的程序比较大,又不好拿给你看,我下午要验收现在急啊!
public int update(String name,double wage)
{
try
{
Statement s=con.createStatement();
String query="update Company set wage ='"+wage+"' where name='"+name+"'";
s.executeUpdate(query);
return 0;
}
catch(SQLException e) {
System.out.println("SQLException: " +e.getMessage()+"Hello");
return 1;
}
}
你看得懂错误日志吗?我想让你帮我看看
1.s没有关闭,这是DB操作大忌
2.java作为一个面向对象的语言,没有必要又用异常处理,又用面向过程的这种return 0/return 1
3.没有看见你连接的管理,所以不知道你对于连接和事务的管理情况