JAVA serial receiving old messages from arduino

Hello. During this day we had alot of different problems with java and serial port, but this time we cant even google it.

So. We have 3 different arduino sending integers to Uno via nrf24l01+, messages are 1001, 2002, 3003.
I see them all in serial port on receiver IDE, everything works fine, but in Java, we only see the very first message, and any message after is always the same as the first one (sending 1001, then 2002, but still getting 1001).

Even if its only 1 arduino, and we open serial of it, send message, i.e. 1001, then reupload the sketch to arduino with message 2002, we will still receive 1001.

We have no idea on where to look at or what to read.

We have no idea on where to look

Tea leaves are probably not the answer. I suspect that looking at the code is. If you posted it, other people might even look at it, and see what you are doing wrong.

I'm going to guess that you keep appending data to a string, without ever resetting the string.

If you need help with a programming problem you do have to post the code so we can see what you can see.

I am not an expert on Java - I dislike it and I avoid it. I did spend some time programming in JRuby and using RxTx and more recently JSSC. Both worked well with my Arduinos. The newer JSSC seems easier to use and RxTx seems not to be supported any longer.

In this Python demo there is also a JRuby example which may be useful. It may also be useful (for learning) to write Java code to work with my Arduino code as you will know that the Arduino code works.

...R

Thank you for your answers, guys!

It was completely our code fault, and not jSSC. There was a problem with input handling, and it took few hours to rewrite everything, but now it works.