PRB: Possible Reasons for "Failed to create object"

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

SYMPTOMS

When you try to instantiate a COM object written in Java, you may encounter the following error message:

   Failed to create object

MORE INFORMATION

Following is a checklist that provides some of the common fixes for this error. Make sure that:

  1. The .class for the Java class is in the classpath.

  2. Your Java method is declared "public."

  3. You need to register the class file (using Javareg.exe).

  4. Install the latest Java VM from http://www.microsoft.com/java if you are attempting to use CreateObject().

  5. Follow the steps in the Visual J++ sample COMCALLINGJAVA.

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