Microsoft KB Archive/306147

= PRB: JBrowser Sample Does Not Compile with Internet Explorer 5.5 =

Article ID: 306147

Article Last Modified on 6/14/2006

-

APPLIES TO


 * Microsoft Software Development Kit for Java 3.0
 * Microsoft Software Development Kit for Java 3.0
 * Microsoft Software Development Kit for Java 3.1
 * Microsoft Software Development Kit for Java 3.2
 * Microsoft Software Development Kit for Java 4.0
 * Microsoft Internet Explorer 5.5

-



This article was previously published under Q306147



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 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.



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.



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 &quot;More Information&quot; section.



Steps to Reproduce the Behavior
  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){} }                     Change to an abstract class for Internet Explorer 5.5 compatibility: abstract class JBrowser extends Frame implements IUIActionListener, ActiveXControlListener, WebBrowserEventListener   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; }                   

