Microsoft KB Archive/167953

= PRB: Possible Reasons for the "Failed to create object" Error Message =

Article ID: 167953

Article Last Modified on 11/14/2005

-

APPLIES TO


 * Microsoft Java Virtual Machine

-



This article was previously published under Q167953



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

Failed to create object



WORKAROUND
Following is a checklist that provides some of the common fixes for this error. Make sure that you verify all of the following:
 * The .class for the Java class is in the classpath.
 * Your Java method is declared "public."
 * You register the class file (using Javareg.exe).
 * You install the latest Microsoft virtual machine from http://www.microsoft.com/mscorp/java if you are attempting to use CreateObject.
 * Follow the steps in the Visual J++ (versions 1.0 and 1.1) sample COMCALLINGJAVA.

