Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting error in setupConnection()

 
Vishal Hegde
Ranch Hand
Posts: 1077
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,
Well the code is big enough but i am getting error in this method.

Seriously not able to trace the error



private void setupConnection()
{
try{
ServerSocket serverSocket = new ServerSocket(2000);
Socket client = serverSocket.accept();
//System.out.println("Connection Established");
jTextField1.setText("Connection Established");
DataInputStream serverInputStream = new DataInputStream(new BufferedInputStream(client.getInputStream()));
int height = serverInputStream.readInt();
jTextField1.setText(" "+height);
serverInputStream.close();
generatePIN();
}
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, what's the error? Is it a compiler error, or a runtime error?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic