This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.net.SocketException: null fd object  RSS feed

 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was wondering if someone knows whats wrong with my code. I've created a class that makes a connection to a server. The relevant code is as follows:

I'm generating a java.net.SocketException: null fd object, when I try to read input from the server with the following method:

If I don't make a call to this method, and just inititate the connection, I don't get an exception. Does anyone know how I can get Output from the Server. If I telnet into the server I'm trying to access it gives server info after a few seconds.
Thanks.
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
problem solved. thanks.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!