File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A Package Question

 
Arul Jose
Ranch Hand
Posts: 131
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:. TestInterfaceMember.java
TestInterfaceMember.java:2: cannot find symbol
symbol : class pkg
location: class test
class TestInterfaceMember implements test.pkg.I
^
TestInterfaceMember.java:2: interface expected here
class TestInterfaceMember implements test.pkg.I
^
TestInterfaceMember.java:6: cannot find symbol
symbol : variable i
location: class TestInterfaceMember
System.out.println(i);
^
3 errors
[aruljose@aruljose javatry]$ ls classes
test/
[aruljose@aruljose javatry]$ ls classes/test/
pkg/
[aruljose@aruljose javatry]$ ls classes/test/pkg/
I.class

TestInterfaceMember.java


classes/test/pkg/I.java
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic