PoolManager.getInstance();是注册驱动等于Class.forName(driverClassName)
解决方案 »
- 新手急求救啊,tomcat5.5.17报错:flushing the buffer in release()。跪谢
- 一个很难解决的webservice的问题
- 使用AXIS2出现的Mapping qname not fond for the package
- 为什么都用servlet?而不用STRUTS呢?
- struts第一问!
- 如何把java类文件中的html串显示到jsp页面上呢??
- jbuilder9中不能启动tomcat??急,求助
- 我的EJB客户端怎么老是出错啊
- 在J2EE的Web項目中怎樣做Menu,要求有能夠根據權限來顯示菜單,最好不用Applet,javaScript
- ssh2使用aop后属性注入失败
- 新人求教:关于ibatis的SqlMapClient,怎么避免异常声明?
- 正则表达式问题~同学们来看看
执行完后Main线程结束,子线程被强制结束了。
你可以试试这样写:new Thread(new OperateDB()).start();
Thread.sleep(10000); //Main等待10秒
System.out.println("主线程结束");
class Test
{
public static void main(String[] args)
{
new Person().say();
}
class Person {
public void say(){
System.out.println("hello world!");
}
}
}当编译时,会报错。
class Test
{
public static void main(String[] args)
{
new Person().say();
}
class Person {
public void say(){
System.out.println("hello world!");
}
}
}
所以,我给你的建议是,把这个类调出去。像下面这样。
class Test
{
public static void main(String[] args)
{
new Person().say();
}
}
class Person {
public void say(){
System.out.println("hello world!");
}
}