File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Getting error in setupConnection() Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Getting error in setupConnection() " Watch "Getting error in setupConnection() " New topic
Author

Getting error in setupConnection()

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 973


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();
}


http://www.lifesbizzare.blogspot.com || OCJP:81%
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24057
    
  13

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


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting error in setupConnection()
 
Similar Threads
classpath issue jdbc-applet
bmi calculation help please!
GUI Chat
Applets & Sockets .The Security Issue Of JAVA.
JLabel1.setText error