-
August 22nd, 2004, 05:45 PM
#11
I have the latest stable VM (1.4.2_05) already as I thought that was the problem. Nothing is solved
The above sentences are produced by the propaganda and indoctrination of people manipulating my mind since 1987, hence, I cannot be held responsible for this post\'s content - me
www.elhalf.com
-
August 23rd, 2004, 04:23 PM
#12
Originally posted here by el-half
I have commented out the code that may cause trouble.
[...]
But it's strange, while there is no exception anymore when I remove actionPerformed's content the exception thrown has nothing to do with IO...
How about a catch block that reads:
Code:
try {
blahblah...;
} catch (Exception e) {
System.out.println("Exception Thrown: "+ e.getClass().getName() +");
System.out.println("Message: "+ e.getMessage());
}
Should help you understand which exception is being thrown.
Chris Shepherd
The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
\"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
Is your whole family retarded, or did they just catch it from you?
-
August 23rd, 2004, 04:33 PM
#13
Thanks, I now found out a NullPointer exception is thrown, so something is wrong with the IO stuff after all. I think.
/me is unable to fix it.
The above sentences are produced by the propaganda and indoctrination of people manipulating my mind since 1987, hence, I cannot be held responsible for this post\'s content - me
www.elhalf.com
-
August 24th, 2004, 03:28 PM
#14
NullPointerException is probably being thrown by that DataConnect class. I'd help, but DataConnect isn't a part of the Java API. I'd assume reading the third party docs for it might help you a bit.
Chris Shepherd
The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
\"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
Is your whole family retarded, or did they just catch it from you?
-
August 24th, 2004, 03:33 PM
#15
DataConnect is a class I wrote:
Code:
class DataConnect { //class for transfer of image
Socket socket = null;
BufferedInputStream buffer = null;
DataInputStream data_reader = null;
String address = "192.168.1.3";
int PORTNUM;
public DataConnect(int port) {
PORTNUM = port;
}
void establishConnection() {
try {
socket = new Socket(address, PORTNUM);
buffer = new BufferedInputStream(socket.getInputStream());
data_reader = new DataInputStream(buffer);
} catch (IOException e) {
System.err.println("Exception: " + e.getMessage());
System.exit(1);
}
}
}
The above sentences are produced by the propaganda and indoctrination of people manipulating my mind since 1987, hence, I cannot be held responsible for this post\'s content - me
www.elhalf.com
-
August 24th, 2004, 03:53 PM
#16
The exception should give you line numbers, so you should be able to figure out what line in which file is generating the exception. You might also try something like:
Code:
try {
i=0;
while ((image[i++] = dataconn.data_reader.readByte()) != -1) {
// Read data in while it's not EOS
}
} catch (Exception e) {
System.out.println("Exception Thrown: "+ e.getClass().getName() +");
System.err.println("Exception: " + e.getMessage());
}
Chris Shepherd
The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
\"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
Is your whole family retarded, or did they just catch it from you?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|