psjava
Run .psjava files as scripts — plain Java on top of JShell, with zero ceremony.
There's no custom syntax and no transpilation: whatever is in the file is exactly what jshell runs. psjava only adds a small print helper to the session and strips the Windows BOM — nothing else touches your code.
Install
npm install -g @thiagodiogo/psjavaRequires a JDK 11+ with jshell on your PATH. Verify your setup with psjava doctor.
Usage
psjava example.psjava # run the file
psjava example.psjava --debug # run, and print the elapsed time at the end
psjava doctor # check that jshell is availableA .psjava file is just Java:
var name = "world";
print("hello, " + name);The print helper
psjava defines a print(...) in the session before your code runs (still plain Java — your file stays untouched). It comes with overloads for String, int[], and List:
print("text"); // text
print(new int[]{1, 2, 3}); // [1, 2, 3]
print(java.util.List.of("a", "b")); // [a, b]System.out.println(...) keeps working as usual.
How it works
psjava reads your file, prepends the print overloads, and pipes the result straight into jshell -s. The only change made to your source is removing the Windows BOM, which jshell chokes on. That's it — plain Java into JShell.