File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes strange probelm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "strange probelm" Watch "strange probelm" New topic
Author

strange probelm

Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
hi,
I used jdk1.2.1 to implement a project, in which I use awt.List. It worked perfect two days ago. But now when I compile, it gave me alot of error about "Interface List", such as
setBounds (....), getSelectedItem () methods are not found in Interface List. List should be a class, how become Interface?
When I compile it in other computers, it is OK. I tried to reinstall JDK1.2.1, the error wont go away.
Anything wrong with the JDK1.2.1. Please help me.
Thanks
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
List is an interface in java.util package. Use fully qualified name will solve your problem.
java.awt.List
Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
hi,
You are right. But the strange thing is that, the program is compiled OK , just two days ago, with the same version.
Is my jdk changed?
p.s. I did not import java.util.*
Roseanne Zhang
Ranch Hand

Joined: Nov 14, 2000
Posts: 1953
Most of the people have moved to JDK1.2.2 or JDK1.3 now, I think you should consider it.
All software has bugs, no exceptions to Sun's or yours.
In other words, All software is bug free, until you find one.
Roseanne
[This message has been edited by Roseanne Zhang (edited February 25, 2001).]
Sandeep Jain
Ranch Hand

Joined: Oct 25, 2000
Posts: 124
hello,
I feel , U are importing java.util. package . Now the problem is compilor is not able to decide whether u r refering to a class which is there in java.awt or an interface which is there in java.util.
If this is the problem prefix the package name and ur problem will be solved.

------------------
Sandeep Jain


Try and Try Till u succeed<br /> <br />Sandeep Jain
 
jQuery in Action, 2nd edition
 
subject: strange probelm