PRB: JavaTLB Emits J5008 Warnings for Some COM Objects

Last reviewed: January 29, 1998
Article ID: Q167952
The information in this article applies to:
  • Microsoft Win32 Virtual Machine for Java, version 1.0

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.

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.

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          : kberrmsg kbtool kbusage JCOM JVM
Technology        : kbInetDev
Version           : 1.0
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 29, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.