944,179 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1759
  • Java RSS
Apr 26th, 2006
0

Hangman classes not working at home.

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rabidpanda is offline Offline
4 posts
since Apr 2006
Apr 26th, 2006
0

Re: Hangman classes not working at home.

Looks like you need to compile the hangman class first.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Apr 27th, 2006
0

Re: Hangman classes not working at home.

I already tried that several times, and it still doesnt work.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rabidpanda is offline Offline
4 posts
since Apr 2006
Apr 27th, 2006
0

Re: Hangman classes not working at home.

Er are you using the latest download of the Jdk and j2re on your computer?
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Apr 27th, 2006
0

Re: Hangman classes not working at home.

I know I'm using the latest JDK, but not sure about the J2re
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rabidpanda is offline Offline
4 posts
since Apr 2006
Apr 27th, 2006
0

Re: Hangman classes not working at home.

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.
Reputation Points: 41
Solved Threads: 31
Junior Poster
G-Do is offline Offline
146 posts
since Jun 2005
Apr 27th, 2006
0

Re: Hangman classes not working at home.

setting the classpath in the control panel did it. Thanks for the help.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rabidpanda is offline Offline
4 posts
since Apr 2006

This thread is more than three months old

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.
Message:
Previous Thread in Java Forum Timeline: Java Encryption error
Next Thread in Java Forum Timeline: TCP Three Way Handshake





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC