Hello everyone.
Thank you for the help that you may be able to provide.
I have created a module with JShell to execute another program type Server and to be able to catch the LOG.
The problem I have is that the Buffer() parameter is not cleaned every time it catches new LOGs.
In each event that a LOG catches, when I print the data it leaves with the data of the previous LOG.
I have placed two examples programs the ShellLog.jar is responsible for calling the JarX.jar.
In the JarX.jar press the test buttons and you will see that in the window of the ShellLog.jar the LOGs come out but mixed with the data of the previous LOG.
How can this be resolved.
Thank you.
Thank you for the help that you may be able to provide.
I have created a module with JShell to execute another program type Server and to be able to catch the LOG.
The problem I have is that the Buffer() parameter is not cleaned every time it catches new LOGs.
B4X:
Sub sh1_StdOut (Buffer() As Byte, Length As Int)
...
'how to clean the buffer()
End Sub
In each event that a LOG catches, when I print the data it leaves with the data of the previous LOG.
I have placed two examples programs the ShellLog.jar is responsible for calling the JarX.jar.
In the JarX.jar press the test buttons and you will see that in the window of the ShellLog.jar the LOGs come out but mixed with the data of the previous LOG.
How can this be resolved.
Thank you.