Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: JBrowser Sample Does Not Compile with Internet Explorer 5.5


View products that this article applies to.

This article was previously published under Q306147

↑ Back to the top


Symptoms

If you build the Microsoft JBrowser sample on a system with Internet Explorer 5.5 and later, the compilation step fails with several J0063 errors. The following error message is one example of a failed build.
nmake.exe MAKEFILE<BR></BR> Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

jactivex.exe -d . C:\WINNT.1\SYSTEM32\shdocvw.dll
Microsoft ActiveX Control Importer For Java V5.00.3601
Copyright (C) 1997-1999 by Microsoft Corporation.
jvc.exe -nologo -nomessage -x- -d . *.java shdocvw\*.java
JBrowser.java(65,41) : error J0063: Declare the class abstract, or implement abstract member 'void WebBrowserEventListener.WindowSetResizable(boolean Resizable)'
JBrowser.java(65,41) : error J0063: Declare the class abstract, or implement abstract member 'void WebBrowserEventListener.WindowSetLeft(int Left)'
JBrowser.java(65,41) : error J0063: Declare the class abstract, or implement abstract member 'void WebBrowserEventListener.WindowSetTop(int Top)'
JBrowser.java(65,41) : error J0063: Declare the class abstract, or implement abstract member 'void WebBrowserEventListener.WindowSetWidth(int Width)'
JBrowser.java(65,41) : error J0063: Declare the class abstract, or implement abstract member 'void WebBrowserEventListener.WindowSetHeight(int Height)'
JBrowser.java(65,41) : error J0063: Declare the class abstract, or implement abstract member 'void WebBrowserEventListener.WindowClosing(boolean IsChildWindow, boolean[] Cancel)'
JBrowser.java(65,41) : error J0063: Declare the class abstract, or implement abstract member 'void WebBrowserEventListener.ClientToHostWindow(int[] CX, int[] CY)'
JBrowser.java(65,41) : error J0063: Declare the class abstract, or implement abstract member 'void WebBrowserEventListener.SetSecureLockIcon(int SecureLockIcon)'
JBrowser.java(65,41) : error J0063: Declare the class abstract, or implement abstract member 'void WebBrowserEventListener.FileDownload(boolean[] Cancel)'
JBrowserOpen.java(28,3) : error J0082: Class 'Dialog' doesn't have a constructor that matches 'Dialog(JBrowser, String, boolean)'
NMAKE : fatal error U1077: 'jvc.exe' : return code '0x1'
Stop.

↑ Back to the top


Cause

The cause of this failure is an incompatibility between the sample source code and an updated event model in the browser control that was included with Internet Explorer 5.5.

↑ Back to the top


Resolution

To work around this problem, add event handlers for the new events. This satisfies implementation requirements for the event interface. For more information about how to modify the JBrowser.java file, see the "More Information" section.

↑ Back to the top


More information

Steps to Reproduce the Behavior

1.Modify the JBrowser.java file as follows:
// Changes are for Internet Explorer 5.5 compatibility.
// 
// JBrowser Internet Explorer 5.5
// 
// This class adds empty methods for new Internet Explorer 5.5 events on    
// the WebBrowserEventListener class interface. The original  
// JBrowser class has been marked abstract and subclassed by this one.

class JBrowserIE55 extends JBrowser { 
	public void WindowSetResizable(boolean resizable){}
	public void WindowSetLeft(int Left){}
	public void WindowSetTop(int Top){}
	public void WindowSetWidth(int Width){}
	public void WindowSetHeight(int Height){}
	public void WindowClosing(boolean IsChildWindow, 
                                   boolean[] Cancel){}
	public void ClientToHostWindow(int[] CX, int[] CY){}
	public void SetSecureLockIcon(int SecureLockIcon){}
	public void FileDownload(boolean[] Cancel){}

        //The following methods are required for Internet Explorer 6.0
        //and later.

   	public void NavigateError(Object pDisp,
                                   Variant URL,
                                   Variant Frame,
                                   Variant StatusCode,
                                   boolean[] Cancel){}
   	public void PrintTemplateInstantiation(Object pDisp){}
   	public void PrintTemplateTeardown(Object pDisp){}
   	public void UpdatePageStatus(Object pDisp,
                                      Variant nPage,
                                      Variant fDone){}
   	public void PrivacyImpactedStateChange(boolean bImpacted){}
}
					
2.Change to an abstract class for Internet Explorer 5.5 compatibility:
abstract class JBrowser extends Frame 
    implements IUIActionListener, 
               ActiveXControlListener, 
               WebBrowserEventListener
					
3.Use the new class to create a JBrowser object:
	/**
	 * This is the main method that creates a JBrowser object.
	 * @param	String[]	The command line parameters:
	 */ 
	public static void main(String[] args)
	{
		//new JBrowser();
		new JBrowserIE55();
	}
					

↑ Back to the top


References

For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:

↑ Back to the top


Keywords: KB306147, kbprb, kbjava

↑ Back to the top

Article Info
Article ID : 306147
Revision : 4
Created on : 6/14/2006
Published on : 6/14/2006
Exists online : False
Views : 345