The information in this article applies to:
SYMPTOMSWhen you build a COM DLL project in Visual J++ 6.0, you get the following build error from the compiler:
CAUSE
In one scenario, this error occurs when you create an ordinary project (not
a COM DLL project) and later decide to package your class (or classes) as a
COM DLL. The compiler sends the error when you select COM DLL packaging,
but you do not designate any class (or classes) in your project as being a
COM Class in the Project Properties on the COM tab. To fix this error, you
can designate one or more of your classes as COM classes in the Project
Properties on the COM tab. You can also choose another packaging option
instead of COM DLL in the Project Properties on the Output Format tab under
Packaging Type.
The compiler needs to have the @com.register comment tag immediately
precede the Java class declaration to which it refers. Otherwise, the Java
class is created as a standard Java class without COM attribute bytes. To
fix this error, you need to move the import statement so that the
@com.register comment tag immediately precedes the Java class declaration
as follows:
RESOLUTIONTo resolve this problem, make sure that any @com.register comment tags immediately precede the Java class declaration. Also, make sure at least one or more of your classes are marked as COM classes if you are using COM DLL packaging. STATUSThis behavior is by design. REFERENCESFor 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/(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Steve Horne, Microsoft Corporation. Additional query words:
Keywords : kberrmsg kbCOMt kbVJ600 kbVJ600FAQ kbComtJavaFAQ kbJavaFAQ |
Last Reviewed: January 12, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |