PRB: Possible Reasons for "Failed to create object"

ID: Q167953


The information in this article applies to:


SUMMARY

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 Microsoft virtual machine from http://www.microsoft.com/java if you are attempting to use CreateObject().


  5. Follow the steps in the Visual J++ (versions 1.0 and 1.1) sample COMCALLINGJAVA.



REFERENCES

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

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

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


SYMPTOMS

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

Failed to create object

Additional query words:


Keywords          : kberrmsg JCOM JVM 
Version           : WINDOWS:
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: July 27, 1999