Article ID: 241111 - Last Review: May 24, 2007 - Revision: 15.3 How to troubleshoot Java applet and component download problemsThis article was previously published under Q241111 On This PageSUMMARY
When an error occurs while downloading and executing or installing Java code using Microsoft Internet Explorer, it may at first be difficult to determine exactly what error occurred and why. This article describes several tools and techniques for getting more information about why an applet or Java-based ActiveX control failed to download, failed to install, or failed to execute.
MORE INFORMATIONInternet Explorer status barThe first potential source of information in the event of a code download problem is in the status bar of Internet Explorer itself. If there is an object in the document window that indicates a problem, such as a gray box where an applet should be, positioning the cursor over that box causes Internet Explorer to show any error information it has in the left portion of the status bar.To see this, create an HTML file containing the following HTML code:
"load: class DoesntExist not found"
This technique is useful for any error involving a Java applet, whether it uses code download techniques or not. For long messages, maximizing the browser window provides more space in the status bar and allows you to see more of the message. However, the information in the status bar is limited to a single line. Java Console or output logFor applets, the Microsoft Virtual Machine (Microsoft VM) also prints error information to a file, or to the Java Console. The file is Javalog.txt in the windows\java or winnt\java directory. Both the Java output log file and the Java Console can be enabled in the Advanced tab of the Internet Options dialog.If you have enabled Java logging or the console and you open the HTML file created for the previous example, you will see a more detailed description of the error: Code Download Log ViewerWhen using a CAB file to download Java classes or ActiveX controls and install them on the client computer, Internet Explorer also generates error log information for the code download process. This information may not be immediately visible, but you can view it using a tool called the Code Download Log Viewer.
Note: if nothing, not even a gray box, appears where there should be an applet, that frequently indicates that an error occurred while trying to install classes into the Java Package Manager. If you see this symptom, the code download log is the first place to look for information.
For a description of how to package Java classes so that the Java classes will be installed in the Java Package Manager on a client computer refer to the Microsoft Knowledge Base article:
193877
(http://support.microsoft.com/kb/193877/
)
How to make your Java code trusted in Internet Explorer
To download the Code Download Log Viewer, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn.microsoft.com/downloads/samples/internet/browsertools/cdllogvw/default.asp
(http://msdn.microsoft.com/downloads/samples/internet/browsertools/cdllogvw/default.asp)
To see how this works, follow these steps:
In this case, the code download log displays something like this: The first line of the "Detailed Error Log" with a non-zero hrStatus indicates the first error that occurred. In this case, it shows that the "module" that "could not be found" is NotThere.cab. Another way to view the Code Download LogYou can also view the code download log without the aid of the Code Download Log Viewer:
Using JPMView to examine installed Java packagesThere is a utility, provided as an on-line sample for Visual J++, which allows you to explore the contents of the Java Package Manager, for example to verify that the Java packages you intended to download and install were actually installed on the client computer.To download the Microsoft Package Manager Explorer, visit the following MSDN Web site: Java Package Manager Viewer pagehttp://msdn.microsoft.com/vjsharp/productinfo/visualj/downloads/samples.asp
(http://msdn.microsoft.com/vjsharp/productinfo/visualj/downloads/samples.asp)
Using WinFile to examine downloaded program filesMany downloaded items are stored in the Downloaded Program Files folder in your Windows directory. With Internet Explorer 4.0 or later installed, Windows Explorer shows a view of the downloaded objects when you view this folder instead of showing the files in the directory. If you need to view the actual files in the Downloaded Program Files directory, you can do so with the File Manager in Windows 95, Windows 98 and Windows NT 4:
Using CABARC to check the contents of a CAB file.The CABARC utility included in the Microsoft .NET Framework SDK is used to create CAB files. It can also be used to examine CAB files. cabarc l filename.cab prints a listing of the files contained in a CAB file. It will also prints the path within the CAB to each file, and it prints all names with the same upper/lower case characters they have in the CAB file.cabarc x *.osd extracts the .osd file from a Distribution Unit. You can then view the .osd file with a text editor to compare the package names, name of the DU, version, and so forth with the values used in the applet tag that downloads the DU. Using ChkTrust to check digital signatures.ChkTrust is a code signing tool that is included in the Microsoft SDK for Java, and documented there. You can use ChkTrust to confirm that a CAB file has been signed with as intended, and that the client-side code that checks digital signatures is operating correctly.ChkTrust.exe verifies the digital signature of a CAB file. For more information, visit the following Microsoft Web site: http://msdn2.microsoft.com/en-us/library/z045761b(vs.71).aspx
(http://msdn2.microsoft.com/en-us/library/z045761b(vs.71).aspx)
You use ChkTrust by typing the following command at a command prompt:chktrust mycab.cab ChkTrust performs a check of the digital signature, and displays either the same security dialog box that is displayed to a user when the code is downloaded or an error dialog box. When you click Yes, No, or OK, ChkTrust prints the results of the signature check.Sometimes this tool will skip the security dialog box and just print the results. One common cause for this is that the digital signature is "always trusted." You can confirm this and correct it if necessary in the security settings of Internet Explorer. For additional information, click the following article number to view the article in the Microsoft Knowledge Base: 168941
(http://support.microsoft.com/kb/168941/
)
Frequently asked questions about CAB Files
REFERENCESFor additional iInformation about using CAB files to download Java code, visit the following Microsoft SDK for Java Web site: http://www.microsoft.com/mscorp/java/
(http://www.microsoft.com/mscorp/java/)
Specific references are
"Packaging and Distributing Software" in the Programmer's Guide and "Software Distribution Tools" in the Tools Reference.Other useful Knowledge Base articles and a list of articles referenced above: 168941
(http://support.microsoft.com/kb/168941/
)
Frequently asked questions about CAB Files
173469
(http://support.microsoft.com/kb/173469/
)
How to enable the Javalog.txt file
175622
(http://support.microsoft.com/kb/175622/
)
PRB: SecurityExceptionEx exception running a Java applet
193877
(http://support.microsoft.com/kb/193877/
)
How to make your Java code trusted in Internet Explorer
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:
http://msdn2.microsoft.com/en-us/ie/default.aspx
(http://msdn2.microsoft.com/en-us/ie/default.aspx)
http://support.microsoft.com/ph/2073
(http://support.microsoft.com/ph/2073)
Specific references on MSDN Web Workshop: Introduction to Internet component downloadhttp://msdn.microsoft.com/library/default.asp?url=/workshop/delivery/download/overview/overview.asp
(http://msdn.microsoft.com/library/default.asp?url=/workshop/delivery/download/overview/overview.asp)
For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:
Internet component download http://msdn.microsoft.com/library/default.asp?url=/workshop/delivery/download/download_node_entry.asp (http://msdn.microsoft.com/library/default.asp?url=/workshop/delivery/download/download_node_entry.asp) http://www.microsoft.com/java
(http://www.microsoft.com/java)
APPLIES TO
| Article Translations
|
Back to the top
