Microsoft KB Archive/167952

= PRB: JavaTLB Emits J5008 Warnings for Some COM Objects =

Article ID: 167952

Article Last Modified on 8/25/2005

-

APPLIES TO


 * Microsoft Java Virtual Machine
 * Microsoft Software Development Kit for Java 1.0
 * Microsoft Software Development Kit for Java 1.5
 * Microsoft Software Development Kit for Java 1.51

-



This article was previously published under Q167952



MORE INFORMATION
Some of the data types that can generate this error are:


 * 1) Parameters that are complex or nested structures.
 * 2) Parameters that have multiple levels of pointer indirection.
 * 3) Return values (or parameters marked with the retval attribute) that are array types.

For example, if you have an interface method declaration like the following in your .tlb file: interface IMyInterface : IUnknown {   SCODE MyMethod ([in]LPOLESTR pArg1, [in]LPOLESTR pArg2,    [out]IAnotherInterface **ppIAnotherInterface); ... } and you run JavaTLB on this .tlb file, you get the Compiler Warning message mentioned above.

NOTE: JavaTLB.exe has been replaced with a new utility in the SDK for Java 2.0 and newer that will have similar limitations.



SYMPTOMS
When you use JavaTLB to generate classes from some COM objects libraries, the following warnings appear:

Method 'identifier' contains data types that cannot be accurately and safely represented in Java. The method will not be converted.



CAUSE
The cause of this warning is that the method uses a type that is not supported in Java. All methods that produce a J5008 warning are omitted from the class file.

Keywords: kberrmsg kbprb kbusage KB167952

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.