FIX: JavaTLB Gives an Internal Compiler Error with VBCCE Control

ID: Q167719

The information in this article applies to:

SYMPTOMS

Running the Visual J++ Java Type Library Wizard, or the Javatlb.exe command line tool on a type library generates the following error:

   fatal error J0001: Internal Compiler Error

CAUSE

This bug can be caused when javatlb encounters a method in the type library with one or more unnamed parameters. One tool known to create unnamed parameters in type libraries is Visual Basic 5.0. Creating an ActiveX DLL in VB 5.0 may generate type libraries with unnamed parameters that cause javatlb to fail with the J0001 error.

RESOLUTION

This bug can be fixed by installing the Service Pack 1 of Visual Studio 97. The Service Pack can be applied to both the Visual J++ 1.1 shipped with Visual Studio 97 as well as the Visual J++ 1.1 that is sold as a standalone product.

Note that installing the Service Pack 1 on the Visual J++ 1.1 free Trial Edition is not a configuration that has been tested by Microsoft. While there are no expected problems with applying the Service Pack to the free Trial Edition, it has not been tested and is therefore not recommended.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Visual Studio 97 Service Pack 1.

For additional information about the Visual Studio 97 Service Pack 1, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q170365
   TITLE     : INFO: Visual Studio 97 Service Packs - What, Where, and Why

MORE INFORMATION

Steps to Reproduce Behavior

The following code can be used in Visual Basic 5.0 to generate an ActiveX DLL that demonstrates the problem:

   Public Property Get Name() As String
      Name = m_Name
   End Property

   Public Property Let Name(n As String)
      m_Name = n
   End Property

Create a new ActiveX DLL project in VB 5.0 and add the preceding code to the (General) section. Build the ActiveX DLL (Project1.dll for this example).

You can then run the Java Type Library Wizard in Visual J++ and select "Project1" from the list box of items to be converted. The Wizard will fail with the following:

   c:\Project1.dll(0,0) : fatal error J0001: Internal Compiler Error

Alternatively, you can run Javatlb.exe from a Command Prompt session, passing in the DLL containing the following type library information:

   javatlb Project1.dll

This will generate the same J0001 error.

The Visual Studio 97 Service Pack 1 updates Javatlb.exe to version 1.01.7048 (as opposed to version 1.01.7022 that ships with VJ++ 1.1), which will inject parameter names into the methods that contain unnamed parameters.

REFERENCES

For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/visualj/ 
   http://support.microsoft.com/support/java/ 

Keywords          : kbCommandLine kbVS97sp1fix kbVS97sp2fix JCOM 
Version           : 1.0 1.1
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbfix

Last Reviewed: November 12, 1998