PRB: Visual J++ 6.0 Code Generator Can Generate Ambiguous Names (194770)
The information in this article applies to:
This article was previously published under Q194770 SYMPTOMS
When compiling code from the code generator and wizards in a Windows
Foundation Classes (WFC) application, one of the following errors may
occur:
Class 'class' doesn't have a method that matches 'method()' (J0078)
Class 'class' doesn't have a constructor that matches 'class()' (J0082)
'field' is not a field in class 'class' (J0234)
CAUSE
The following import statements are made by the wizards and designer code
generators:
import com.ms.wfc.app.*;
import com.ms.wfc.core.*;
import com.ms.wfc.ui.*;
import com.ms.wfc.html.*;
These imports can cause name collisions if your application defines classes
in different packages with the same name as those in the WFC packages.
RESOLUTION
If you must import a package that has class names that conflict with the
above import statements, you must make sure all of your code uses the fully
qualified class names. If you define a class in the default package that
conflicts with the above import statements, you must also make sure all of
your code uses the fully qualified class names. This includes changing code
that was generated by the wizards and Form Designer, for example changing
"new Point(300,300)" to "new com.ms.wfc.ui.Point(300,300)".
STATUS
This behavior is by design.
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:
(c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Derek
Jamison, Microsoft Corporation.
Modification Type: | Minor | Last Reviewed: | 8/25/2005 |
---|
Keywords: | kbide kbprb KB194770 |
---|
|