| Author |
Need help with Java, cannot find symbol class?
|
beu curt
Greenhorn
Joined: Jan 16, 2010
Posts: 18
|
|
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
Joined: Nov 24, 2005
Posts: 14670
|
|
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 ?
|
[My Blog]
All roads lead to JavaRanch
|
 |
Pushkar Choudhary
Rancher
Joined: May 21, 2006
Posts: 425
|
|
|
Is your AddressBookEntry class in the same package as the AddressBook class? If not, you need to import it.
|
 |
Pushkar Choudhary
Rancher
Joined: May 21, 2006
Posts: 425
|
|
Ohh.. Beaten by 11 seconds...!!!
Christophe Verré, I'm sure your network is faster than mine.
|
 |
beu curt
Greenhorn
Joined: Jan 16, 2010
Posts: 18
|
|
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
Joined: Oct 13, 2005
Posts: 32611
|
|
|
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
Joined: Jan 16, 2010
Posts: 18
|
|
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
Ranch Hand
Joined: Jan 12, 2009
Posts: 915
|
|
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 ?"
|
My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
|
 |
 |
|
|
subject: Need help with Java, cannot find symbol class?
|
|
|