Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One class uses other

Status
Not open for further replies.

1510982

Programmer
Feb 17, 2002
57
0
0
SI
OK, I'm doing a project that in which one class uses another.

I have:
C:\simulation\Person.java
C:\simulation\Person.class (already compiled)
C:\simulation\Simulation.java

Simulation.java uses class Person as this:
publiuc Person newPerson = new Person("John", "Doe");

But when I try to javac Simulation.java, it outputs:

Simulation.java:9: cannot resolve symbol
symbol : class Person
location: class Amway
public Person newPerson = new Person("John", "Doe");

How can I use Person.class in Simulation.java?

Thanks you very much in advance...

Rastko
 
I've managed to figure out:

javac --help
------------------------------

javac -classpath C:\Simulation\ Simulation.java

Thanks anyway!

Rastko
 
Did you already check that Person class is a public class???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top