Microsoft KB Archive/325593

= PRB: Error Message After You Import java.util.* and java.awt.* =

Article ID: 325593

Article Last Modified on 8/7/2003

-

APPLIES TO


 * Microsoft Visual J# .NET 2003 Standard Edition
 * Microsoft Visual J# .NET 2003 Standard Edition

-



This article was previously published under Q325593



SYMPTOMS
When you import java.awt.* and java.util.* and then use the List class, you may receive the following compiler error message:

error VJS1185: Type 'List' is imported by at least two 'import-on-demand' statements



CAUSE
Both java.util and java.awt contain List classes, and the compiler does not know which class to use.



RESOLUTION
Fully qualify List when you use it to distinguish between java.awt.List and java.util.List.



STATUS
This behavior is by design.



MORE INFORMATION
The following code demonstrates this error when it is compiled with the Visual J# .NET compiler: import java.awt.*; import java.util.*;

class Class1 {   List l; } To correct the compiler error, fully qualify the List class: java.awt.List l;

Additional query words: list vj# java jsharp vjs1185

Keywords: kbprb KB325593

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.