The information in this article applies to:
SUMMARYWhen 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:
Open this page in Internet Explorer and make sure that the status bar is showing. Check the "Status Bar" item in the View menu if necessary. At first, the status bar may simply display the word "Done," or it may display no message at all, though the applet appears as an empty gray box. If you move the mouse so that the cursor is positioned over the applet, the status bar displays the following message:
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.For additional information about enabling Java error logging refer to the Microsoft Knowledge Base article below: Q177177 Enabling Messages Printed Using System.out.printlnIf 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:
This error includes a Java exception and call stack, and is often more useful than the message from the status bar for determining the cause of an error and finding a solution. In this case, there is one exception indicating that the Microsoft VM could not locate the file NotThere.cab. The ClassNotFoundException indicates that the Microsoft VM could not locate DoesntExist.class. Correcting an earlier exception will often correct exceptions that follow.
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: You can obtain the Code Download Log Viewer from MSDN Online, at http://msdn.microsoft.com/downloads/tools/cdllogvw/CDLOGVW.exeQ193877 HOWTO: Make Your Java Code Trusted in Internet Explorer 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.The Microsoft Package Manager Explorer can be downloaded from the Java Package Manager Viewer page. 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 SDK for Java 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 and ChkJava to check digital signatures.ChkTrust and ChkJava are two code signing tools included in the Microsoft SDK for Java, and documented there. You can use them to confirm that a CAB file has been signed with as intended, and that the client-side code that checks digital signatures is operating properly.ChkTrust.exe verifies the digital signature of a CAB file. ChkJava.exe verifies not only the signature, but whether the file was signed with Java permissions, which are important for the fine-grained security features of the Microsoft VM, and necessary for installing Java code into the Java Package Manager. Please note, however, that ChkJava.exe will present a file that has simply been signed as though it had been signed with full Java permissions. You use both tools in a similar fashion by typing the appropriate command at a command prompt: chkjava mycab.cab or chktrust mycab.cab Both programs perform a check of the digital signature, and display 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, the program prints the results of the signature check. Sometimes these tools 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 needed in the security settings of Internet Explorer; please see the following KB article for details: Q168941 INFO: Frequently Asked Questions for CAB Files REFERENCESInformation about using CAB files to download Java code can be found online in the Microsoft SDK for Java. Specific references are:
Q168941 INFO: Frequently Asked Questions for CAB Files Q177177 Enabling Messages Printed Using System.out.println Q175622 PRB: SecurityExceptionEx Exception Running a Java Applet Q193877 HOWTO: Make Your Java Code Trusted in Internet ExplorerFor more information, please see the MSDN Web Workshop: http://msdn.microsoft.com/workshop/default.aspSpecific references on MSDN Web Workshop: For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site: http://support.microsoft.com/support/visualj/ © Microsoft Corporation 2000, All Rights Reserved. Additional query words: CAB download
Keywords : kbJava kbJavaVM kbVJ kbVJ600 kbGrpJava kbDSupport kbSDKJava320 kbSDKJavaFAQ kbSDKJava400 |
Last Reviewed: January 7, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |