File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes A Package Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "A Package Question" Watch "A Package Question" New topic

A Package Question

Arul Jose
Ranch Hand

Joined: Jan 14, 2005
Posts: 131
I could not come to a conclusion why the class TestInterfaceMember is not compiling. Please see if you can help.

[aruljose@aruljose javatry]$ javac -classpath ./classes:. cannot find symbol
symbol : class pkg
location: class test
class TestInterfaceMember implements test.pkg.I
^ interface expected here
class TestInterfaceMember implements test.pkg.I
^ cannot find symbol
symbol : variable i
location: class TestInterfaceMember
3 errors
[aruljose@aruljose javatry]$ ls classes
[aruljose@aruljose javatry]$ ls classes/test/
[aruljose@aruljose javatry]$ ls classes/test/pkg/

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

Your "ls" shows only the class file in classes/test/pkg. My guess is that it's an outdated class file that actually represents a class named I. Delete the class file, put the source file in its place, and use the same compile command; things should work just fine.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: A Package Question
It's not a secret anymore!