Any good Java REPL tool/implementation?

Any good suggestions on a Java REPL implementation like ‘scala’ and ‘python’ or ‘php -a’?

The java-repl tool works nicely for most situations for me. It is released as a .jar. Hence, it is easy to download and run:

$ wget --quiet -O /tmp/javarepo-428.jar && java -jar /tmp/javarepo-428.jar

One usage example is as follows.

$ wget --quiet -O /tmp/javarepo-428.jar && java -jar /tmp/javarepo-428.jar
Welcome to JavaREPL version 428 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25)
Type expression to evaluate, :help for more options or press tab to auto-complete.
Connected to local instance at http://localhost:33598
java> long ts = System.currentTimeMillis()/1000;
long ts = 1491474800
Leave a Reply

Your email address will not be published. Required fields are marked *