This is a client server program. First you have to laod the server, create a file for the has map to write to then start the client portion. Once the client is running when i type in a name and try to add a name and number it just says invalid number. It not writing from the client server. Any ideas on why it is not doing that would be very helpful.
It would probably make things easier for both of use if you'd start from scratch. Write a client and a server that just send a string back and forth. Then add a feature, like sending a Person object, and get that to work. It would be far simpler to narrow down what isn't working in that case than plowing through this 1000 lines of code, not to mention you'd have a better grasp as to what's going on in your code. It would pay to become familiar with the API Documentation. For example, you may have noticed that in the entry for java.io.ObjectInputStream it says:
In other words, your server thread never starts up because execution is blocked on fromClient = new ObjectInputStream(connection.getInputStream()); One useful debug technique is putting System.out.println(""); statements everywhere and watch the console to make sure you have the values you think you do. You may have noticed that around line 820 you do this:
then a few lines later you do this:
phoneNumber is blank. That's why you are getting that invalid number message. [ December 02, 2003: Message edited by: Joe Ess ]