Using a recent OpenJDK build, having:
---
public class Test {
public static void main(String... args) {
System.err.println(System.console().readLine());
}
}
---
and running it as:
---
$ ./java /tmp/Test.java
te\st
test
---
I.e. the `\` is dropped from the returned value.
---
public class Test {
public static void main(String... args) {
System.err.println(System.console().readLine());
}
}
---
and running it as:
---
$ ./java /tmp/Test.java
te\st
test
---
I.e. the `\` is dropped from the returned value.