Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I view error messages for my Java applet?

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.

like image 314
Code-Apprentice Avatar asked Oct 14 '12 21:10

Code-Apprentice


People also ask

How do I fix error loading applet?

Re-launch the web browser. Go to the Java applet. When the "Security Warning" window asking "Do you want to run this application?" appears, if there is a "I accept the risk and want to run this app." option, checkmark it ON first then --> Click the "Run" button. The Java applet should load OK now.

How do I know if an applet is working?

To check your applet support, visit the Java applet test website at http://java.com/en/download/testjava.jsp. Click Control Panel > Java to view the Java Control Panel. On the Advanced tab, look at Default Java for browsers. If the box for your browser is not checked, check it and click OK.

Why did Java applets fail?

The API wasn't so standardized then, so applets could fail to work if the user didn't have the right version of java installed. They had a slow loading time and used too much memory. They would often crash the browser. Java applets died before Swing came out, so GUIs were difficult and ugly.


1 Answers

Windows:

  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.

  2. Click on the Advanced tab.

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

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.

like image 193
Code-Apprentice Avatar answered Sep 22 '22 11:09

Code-Apprentice