【Java开源代码栏目提醒】:网学会员为需要Java开源代码的朋友们搜集整理了AppThreadGroup.java相关资料,希望对各位网友有所帮助!
package com.cownew.Char13;
public class AppThreadGroup extends ThreadGroup
{
public AppThreadGroup()
{
super("AppThreadGroup");
}
public void uncaughtException(Thread t, Throwable e)
{
System.out.println("未捕获异常");
e.printStackTrace();
}
public static void main(String[] args)
{
// 把我们自己的程序当作这个线程组的一个线程来运行
new Thread(new AppThreadGroup(), new Runnable() {
public void run()
{
// 在这里调用我们自己的
程序的入口函数
}
}).start();
}
}