This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Java in General and the fly likes Getting error in setupConnection() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Getting error in setupConnection() " Watch "Getting error in setupConnection() " New topic

Getting error in setupConnection()

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1067

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

Seriously not able to trace the error

private void setupConnection()
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);
} || OCJP:81%
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24193

So, what's the error? Is it a compiler error, or a runtime error?

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Getting error in setupConnection()
It's not a secret anymore!