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?
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.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.