• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Getting error in setupConnection()  RSS feed

 
Ranch Hand
Posts: 1083
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();
}
 
author and iconoclast
Sheriff
Posts: 24220
40
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!