Article ID: 167719
Article Last Modified on 5/12/2007
APPLIES TO
- Microsoft Visual J++ 1.0 Standard Edition
- Microsoft Visual J++ 1.1 Standard Edition
This article was previously published under Q167719
SYMPTOMS
Running the Visual J++ Java Type Library Wizard, or the Javatlb.exe command line tool on a type library generates the following 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:
170365 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:
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:
Keywords: kbbug kbcommandline kbfix kbvs97sp1fix kbvs97sp2fix KB167719