jshell

File Read

The content is leaked as error messages.

jshell
jshell> /open /path/to/input-file

File Write

Writes only the valid Java code to file.

jshell
String x = "DATA";
/save /path/to/output-file

Shell

jshell
Runtime.getRuntime().exec("/path/to/command");