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

Need help with Java, cannot find symbol class?

 
beu curt
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The program is an Address Book. and I cant get rid of the "cannot find symbol class" error, what should I do?

here is the code:



Here is the error:
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The compiler does not find the AddressBookEntry class because it's not in the CLASSPATH
1. Where is AddressBookEntry.class ?
2. How did you compile AddressBook ?
 
Pushkar Choudhary
Rancher
Posts: 425
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your AddressBookEntry class in the same package as the AddressBook class? If not, you need to import it.
 
Pushkar Choudhary
Rancher
Posts: 425
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ohh.. Beaten by 11 seconds...!!!
Christophe Verré, I'm sure your network is faster than mine.
 
beu curt
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christophe Verré wrote:The compiler does not find the AddressBookEntry class because it's not in the CLASSPATH
1. Where is AddressBookEntry.class ?
2. How did you compile AddressBook ?


A big noob here, can't understand what you are trying to explain.
sorry
 
Campbell Ritchie
Sheriff
Pie
Posts: 47288
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please find the class whose name you are getting the problems with, and tell us exactly where you have got the .class file.
 
beu curt
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Please find the class whose name you are getting the problems with, and tell us exactly where you have got the .class file.


This is the whole program. I posted everything.

I think the problem is line number 8:

 
salvin francis
Bartender
Pie
Posts: 1227
10
Eclipse IDE Google Web Toolkit Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well...

Take a look at the program written...

it requires two different classes : AddressBook and AddressBookEntry

You have provided code that shows the defination of AddressBook,
but where is AddressBookEntry ?
thats what the java compiler is saying:

"cannot find symbol class AddressBookEntry"

let me rephrase/interpret that:

"Dude, I want to run your program, but I am unable to find a class named 'AddressBookEntry'. Its probably in a file called AddressBookEntry.java,
have you forgotten to define such class? if you have defined it, is it in the same class path so that I may access it ?"



 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic