Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot find interface

Status
Not open for further replies.

culshaja

Programmer
Aug 10, 1999
705
GB
Hi,<br><br>I have defined an interface which is part of a package:<br><br><FONT FACE=monospace>package filemanager;<br><br>public interface FileManagerObject {<br>&nbsp;&nbsp;&nbsp;&nbsp; public void rename(String name);<br>}</font><br><br>I then use this interface in another class:<br><br><FONT FACE=monospace>package filemanger;<br><br>public class File implements FileManagerObject {....</font><br><br>When I attempt to compile File.java I get the following error:<br><br><FONT FACE=monospace><font color=red><br>File.java:15: cannot resolve symbol<br>symbol : class FileManagerObject<br>location: calss filemanager.File<br>public class File implements FileManagerObject {<br></font></font><br><br>What am I doing wrong?<br><br>James :)<br><br> <p>James Culshaw<br><a href=mailto:james_culshaw@activedatasolutions.madasafish.com>james_culshaw@activedatasolutions.madasafish.com</a><br><a href= > </a><br>
 
It sounds like you have a classpath problem. Make sure that the directory filemanager, is in your classpath. What I usually do is have a directory dedicated to packages. Something like&nbsp;&nbsp;c:\java\library\ (you should use the appropriate directory structure for your O/S). Then all you do is store your packages under the library directory and have your classpath set to look at c:\java\library. This way you don't need to add more listings to your classpath.<br><br>Hope this helps... <p> fenris<br><a href=mailto:fenris@hotmail.com>fenris@hotmail.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top