如何查看 Java 小程序的错误消息? [英] How do I view error messages for my Java applet?

查看:27
本文介绍了如何查看 Java 小程序的错误消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试回答 时小程序问题,OP 不知道如何查看他的小程序的错误消息.自从我自己这样做已经有一段时间了,我没有找到任何一步一步的说明,所以我在这里发布了一个问题和答案,供后代参考.

While trying to answer a applet question, the OP didn't know how to view error messages for his applet. It's been a while since I did this myself and I didn't find any step-by-step instructions for doing it, so I am posting a question and answer here for future generations.

推荐答案

Windows:

  1. 双击右下角时钟旁边系统托盘中的 Java 图标.这将打开 Java 控制面板.

  1. Double-click on the Java icon in the System tray next to the clock in the lower right corner. This will open the Java Control Panel.

点击高级"标签.

单击Java 控制台"旁边的 +,然后单击显示控制台".

Click on the + next to "Java Console" then click on "Show the Console".

Java 控制台将显示任何堆栈跟踪,显示来自抛出的异常的错误消息.您还可以将 System.out.println() 调用添加到您的小程序代码中,以在控制台中打印您自己的自定义消息.

The Java Console will display any stacktraces showing error messages from thrown Exceptions. You can also add System.out.println() calls to your applet code to print your own custom messages in the console.

这篇关于如何查看 Java 小程序的错误消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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