How to Troubleshoot a Java Applet
A Java applet troubleshooting process involves checking a number of factors. This is because it may be difficult at first to determine exactly what the error is and why it occurred. A number of tools have been developed to help simplify the troubleshooting process. Some of these tools can even attach themselves onto the web browser and help locate errors in a web page. One of these is the firebug utility. In most cases however, the status bar will be the first source of error information.
Instructions
-
Check Java installation
-
1
Open the command prompt window by going to: "Start," "Menu" and type "cmd". A black command window pops up.
-
2
Type the command below:
"Java --version" -
-
3
Determine the Java version from the output generated. Upgrade your version if necessary by visiting the Java site.
Check the Java Applet
-
4
Fire up your Notepad application.
-
5
Copy and paste the code below:
HTML>
<HEAD>
</HEAD>
<BODY>
<applet code=Does not Exist.class name=Does not Exist
width=300 height=200>
<param name=cabbase value= Not There.cab>
</applet>
</BODY>
</HTML> -
6
Save the file and open it in a web browser. This technique is used to test a Java applet code. The applet is functional if a message is displayed.
Output Log
-
7
Open a web page that you want to check for errors in a web browser.
-
8
Navigate to the Java folder using the path:
C:\Windows\java
Or
C:\windows\winnt
-
9
Locate the file "Javalog.txt" that contains the output log errors. This will give a detailed description of the error. You can locate the installation files errors, as well as missing classes that are causing the errors with this technique.
Log Viewer
-
10
Download the Code download log viewer from the MSDN website.
-
11
Open the HTML page to be tested for errors. Use a web browser like Internet Explorer.
-
12
View the log viewer to check for errors. The log file is usually detailed to indicate all Java applet errors.
-
1
Tips & Warnings
Some websites have been designed to check if you are running the latest versions of Java. Different versions of Java may display different error results. It is always advisable to have the latest version of Java installed to avoid errors resulting from Java version incompatibility.
Ninety-five percent of all applet problems are the result of coding errors. Check that all Java applet tags are in place.
References
Resources
- Photo Credit error image by dead_account from Fotolia.com