0

Well, I'm working on the hangman program. We were told to do it with three classes, a hangman class, an interface class and a tester class. I got the program working at school last night, but when I loaded it at home, it doesnt compile right. The hangman class will compile fine, but the interface wont recognize the hangman class, I get the following message.

F:\hangman\Interface.java:5: cannot find symbol
symbol : class Hangman
location: class Interface
private Hangman logic;
^
F:\hangman\Interface.java:7: cannot find symbol
symbol : class Hangman
location: class Interface
public Interface(Hangman l)
^
2 errors

Tool completed with exit code 1

this also happens with a previous project of mine so I assume it's something set up in my computer. Any ideas?

4
Contributors
6
Replies
7
Views
11 Years
Discussion Span
Last Post by rabidpanda
0

Hi rabidpanda,

It could be a classpath issue. Is Hangman.java in the same directory as your other two files? If not, try setting the classpath explicitly using the -classpath command-line option to javac.

0

setting the classpath in the control panel did it. Thanks for the help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.