Hmm, JSP-Interest and a question about an Applet... what's wrong with this
picture?

Anyway, the error message is very clear. You should try reading such things.
When you have two classes of the same name available via import, the
compiler doesn't know which one you meant - it can't read your mind, just
like you apparently won't read its messages. In this case, you want to
specify "java.awt.List" or "java.util.List" whenever you refer to the class.


>From: "Nguyen, Thang P" <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>     reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: java.awt.List error
>Date: Wed, 16 May 2001 17:06:09 -0700
>
>Hi,
>
>Can someone pls tell me what I did wrong here? The java compiler keeps
>complaining about the List class.  I include the error, my PATH, and source
>code below:
>Thanks much in advance.
>TN
>======================   Error ===============
>C:\APPLET~1\client>javac TestDBApplet.java
>TestDBApplet.java:12: Ambiguous class: java.awt.List and java.util.List
>         private List studentList;
>                                 ^
>TestDBApplet.java:22: Ambiguous class: java.awt.List and java.util.List
>                 studentList = new List();
>                                   ^
>TestDBApplet.java:23: Class <<ambiguous>>List not found in void init().
>                 studentList.setFont(new Font("monospaced", Font.PLAIN, 12)
>                                    ^
>TestDBApplet.java:24: Class <<ambiguous>>List not found in void init().
>                 this.add(BorderLayout.CENTER, studentList);
>                         ^
>========================= Path
>==================================================
>
>C:\APPLET~1\client>path
>PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\ORANT\BIN;C:\ORAWIN\BIN;u:\;;C:\WINDO
>WS\S
>ystem32\WBEM;C:\WINDOWS\System32\WBEM;C:\MSSQL7\BINN;C:\Program
>Files\Microsoft
>Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual
>Studio\Common
>\MSDev98\Bin;C:\Program Files\Microsoft Visual
>Studio\Common\Tools;C:\Program Fi
>les\Microsoft Visual Studio\VC98\bin;c:\program
>files\devstudio\sharedide\bin\id
>e;c:\program files\devstudio\sharedide\bin;c:\program
>files\devstudio\vc\bin;c:\
>informix\bin;c:\jdk1.2.2\bin;c:\jdk1.2.2\jre\bin;c:\tomcat3.2.1\jakarta-tomc
>at-3
>.2.1\webapps\webdev\WEB-INF\classes
>
>
>
>
>==========  my source code below ==========
>
>
>
>import java.awt.*;
>import java.awt.event.*;
>import java.applet.*;
>
>import java.util.*;
>import java.io.*;
>import java.net.*;
>
>public class TestDBApplet extends Applet
>{
>
>         private List studentList;
>         private TextArea statusTextArea;
>
>
>         private final int COLUMN_WIDTH = 20;
>
>         public void init()
>         {
>                 this.setLayout(new BorderLayout());
>
>                 studentList = new List();
>                 studentList.setFont(new Font("monospaced", Font.PLAIN,
>12));
>                 this.add(BorderLayout.CENTER, studentList);
>
>         }
>
>}
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to