This discussion is archived
2 Replies Latest reply: May 10, 2010 9:00 AM by 843810 RSS

java compiler question

843810 Newbie
Currently Being Moderated
I am trying to compile two classes, "" and "", that are both in a package called "dinnerObjects". I am trying to reference the Table class in the other class, Person.

The class compiles successfully.

When I compile from command line, using "javac" while in the directory "dinnerObjects", I get the error:
$ javac cannot find symbol
symbol  : class Table
location: package dinnerObjects
import dinnerObjects.Table;
I have seen people using "javac -cp..." and don't know what this does.

In the class Person, I use:
package dinnerObjects;
import dinnerObjects.Table;
and likewise in the class Table, I use:
package dinnerObjects;
import dinnerObjects.Person;
Am I doing something wrong in Or should I be using "javac -cp"?

Please let me know!! Thanks!