What about the official JShell REPL in Java 9?

A user asked me “Are you familiar with the REPL in Java 9?  You should leverage it”. I want to lay out why I don’t.

To me a JEP is doesn’t yet feel like the right place for what I want to do. Yes, I have a bit of a REPL but I consider it just one facet. Most java people love GUIs, I see JPad as an environment to quickly run java code and to visualise it in many ways. To achieve this I want:


  1. To take an opinionated approach to what libraries are automatically  included (guava/apache,lombok..). Reducing the code clutter.
  2. To provide an opinionated output format (Everything is a table and shows as HTML).
  3. To then allow other people to add output format extensions as they see fit. For example I added one that displays the last “table” as a jfreechart. There’s no reason this couldn’t expand to javascript chart exports and any other type of visualization that anyone wants to add.


I think a JEP conflicts with taking quick opinionated approaches, I realise there are reasons for this, backwards compatibility etc. but that’s not something I think is important right now. If once people show interest and a load of visualizations and toString()/console outputs were added, then would be the time to consider canonical representations I think and where a JEP would be good.

That’s my 2 cents anyway :)

Leave a Reply

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