• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Echo client/server application

 
Roger Fed
Ranch Hand
Posts: 82
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I've developed two classes for Echo client/server apllication
the server class works well but when i try to run the client class it flags me two errors
This is the client class

when i write this command in command prompt:javac TCPEchoClient.java
it flags me these two errors:
TCPEchoClient.java:5: <identifier> expected
private static InetAddre
^
TCPEchoClient.java:7: reached end of file while parsing
}
^
2 errors

How can i get rid of these two errors?
thanks in advance...........
 
Henry Wong
author
Marshal
Pie
Posts: 20826
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roger Fed wrote:
when i write this command in command prompt:javac TCPEchoClient.java
it flags me these two errors:
TCPEchoClient.java:5: <identifier> expected
private static InetAddre
^
TCPEchoClient.java:7: reached end of file while parsing
}
^
2 errors

How can i get rid of these two errors?
thanks in advance...........


Are you saving the file and compiling at the exact same time? Or using some sort of autosave?

According to the messages, the compiler is only seeing a file that is 7 lines long. And clearly not the text that your shown here.

Henry
 
Rob Spoor
Sheriff
Pie
Posts: 20369
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do not use println in combination with sockets. Always use an explicit \n or \r\n, depending on your needs. If you don't your code may stop working if you move it from one machine to another.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic