MyException - 我的异常网
当前位置:我的异常网» J2SE » "AWT-EventQueue-0" java.lang.IllegalTh

"AWT-EventQueue-0" java.lang.IllegalThreadStateException

www.MyException.Cn  网友分享于:2013-11-10  浏览:946次
线程问题,运行时候泡这个异常!
Exception in thread "AWT-EventQueue-0" java.lang.IllegalThreadStateException
at java.lang.Thread.start(Unknown Source)
at PlayUI.LyricsDisplay(PlayUI.java:509)
at PlayUI.playSong(PlayUI.java:868)
at PlayUI.playState(PlayUI.java:836)
at PlayUI$2.mouseClicked(PlayUI.java:287)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.List.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


------解决方案--------------------
给你个建议吧
1 你的线程有结束条件吗?设置停止标志。
2 2个线程有冲突,你应该等第一个线程结束,再启动第二个线程
3 java的 Thread.stop 方法可以强行干掉线程,但不推荐。

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有