目标小程序或 JVM 进程突然退出 [英] Target applet or JVM process exited abruptly

查看:19
本文介绍了目标小程序或 JVM 进程突然退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到消息 目标小程序或 JVM 进程突然退出 有时并且它不会连续出现,所以我无法在 Java 控制台关闭之前跟踪日志.我尝试使用

I'm getting message Target applet or JVM process exited abruptly sometimes and its not coming continuously so I can't trace the log before Java Console closes. I tried to increase heap size using

,

,

但它不起作用.同样的问题已经问过了.我还尝试使用

but its not working. Same question already asked. I also tried to load Applet in separate JVM using

http://www.techques.com/question/1-11284843/uncaught-exception:-Target-applet-or-JVM-process-exited-abruptly---from-a-firefox 扩展

未捕获的异常:目标小程序或 JVM 进程突然退出 - 从 Firefox 扩展

https://stackoverflow.com/questions/17676722/target-jvm-似乎已经退出

推荐答案

如果您能让您的客户以完全信任的方式运行小程序,您可以做以下几件事:

If you can get your client to run the applet as fully trusted, there's several things you can do:

  1. 安装 默认异常处理程序,并让它向您发送异常信息.
  2. 调用 System.setOut()System.setErr() 并将结果发送给您.
  3. 安装关闭挂钩和安全管理器在 JVM 关闭时被告知
  1. Install a default exception handler, and have it send the exception information to you.
  2. Call System.setOut() and System.setErr() and send the results to you.
  3. Install shutdown hooks and a security manager to get told when the JVM is shutting down

否则你可以尝试:

  1. 创建一个非守护进程线程并让它永远休眠,以尝试通过激活至少一个线程来防止小程序关闭.(我几乎没有使用小程序的经验,我不确定这是否可行).
  2. 使用 Java 日志系统并将信息发送给您,希望导致崩溃的问题在崩溃之前记录一些事情.
  1. Creating a non-daemon thread and have it sleep forever, to try to prevent the applet from closing by having at least one thread active. (Having hardly any experience with applets, I'm not sure if this would work).
  2. Use the Java logging system and have the information be sent to you, in the hopes that the problem that causes the crash logs something right before the crash.

这篇关于目标小程序或 JVM 进程突然退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆