JSR-223 problems with using custom STDOUT
Brought to you by:
ian_farmer,
jim_roseborough
The problem specifically is in org.luaj.vm2.script.LuajContext: the WriterOutputStream wrapper is broken. I suggest this code instead:
Also, when you create the PrintStream() wrappers, make sure the second argument is "true" to allow for automatic flushing for each line, which is the expected behavior.
Fixes for this were put into version 3.0