我通过扩展 Thread 在 java 中使用 Thread。该线程不断执行一些后台工作。但经过一段时间(大约 15 分钟),线程自动关闭,程序崩溃。请帮助如何在java中创建一个执行一些后台功能的长期运行线程,并且线程必须保持活动状态直到应用程序活动。但我的问题是我的线程甚至在我的应用程序关闭之前就关闭了。
最好的问候, AlenLee MJ
> Exception Coming:Execution protection violation
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1000cb77, pid=1028, tid=11996
> #
> # JRE version: 7.0_10-b18
> # Java VM: Java HotSpot(TM) Client VM (23.6-b04 mixed mode, sharing windows-x86 )
> # Problematic frame:
> # C 0x1000cb77
> #
> # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
> #
> # An error report file with more information is saved as:
> # E:\alen_project\QrCodeScanningAppForCCD\hs_err_pid1028.log
> #
> # 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.
> #