Has anyone used the System.out.print() function as part of B4J inline code (or a library)?
It is supposed to print text onto a line (without any linefeed).
On windows this is true.
But on Linux it has a trailing linefeed same as the println() function.
So you can't leave the cursor at the end of the same line as the printed text.
I have tested this with OpenJDK11.0.4 and JDK8u192 installed under Ubuntu.
Both have the same problem.
Maybe someone else can do a test to confirm.
Please let me know.
PS: I tried to lodge a bug report for OpenJDK but can't work out how to do it.
It is supposed to print text onto a line (without any linefeed).
On windows this is true.
But on Linux it has a trailing linefeed same as the println() function.
So you can't leave the cursor at the end of the same line as the printed text.
I have tested this with OpenJDK11.0.4 and JDK8u192 installed under Ubuntu.
Both have the same problem.
Maybe someone else can do a test to confirm.
B4X:
Public Sub Print(Prompt As String)
Private nativeMe As JavaObject=Me
nativeMe.RunMethod("javaPrint",Array(Prompt))
End Sub
#If JAVA
public static void javaPrint(String prompt)
{
System.out.print(prompt);
}
#End IF
Please let me know.
PS: I tried to lodge a bug report for OpenJDK but can't work out how to do it.