質問

I' creating application that reads/writes to/from com port using RXTXComm library. When I'm trying to read one byte from stream everything goes fine.

while ( ( data = in.read() ) > -1 )

Then I tried to read []byte and put breakpoint to this line:

int g = in.read(buffer,off,len);

When debug reaches this place and I do resume debug - new window with message described bellow appears:

Class File Editor

Source not found
----------------------
The JAR file c:\pro\RXTXcom.jar has no source attachment.
You can attach the source by clicking Attach Source below:

What is the problem? This is not exception, because I can't catch it in try-except block. What is this? I didn't asked for "trace in" and I don't need source.

役に立ちましたか?

解決

It appears that your IDE (which you do not name) is telling you it is trying to display a line from the RXTXcom library, but it has no source code to use to do so. I would expect this if I were using eclipse, had a binary-only copy of the library, exception checking turned on in the debugger, and the library threw an exception.

I don't recognize "resume debug - new window", so I don't know what effect that might have.

Eclipse has a "step out" function in its debugger, allowing you to step through the next return statement; that might help you get to a level for which you do have source.

I doubt this message has much to do with your actual 1 byte vs. byte array reading problem.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top