Is there any Python-like interactive console for Java?

I spent a lot of time programming in Java recently, and one thing I miss from scripting languages was the ability to test them in a console.

To quickly test a java program, I have to edit a file, then turn it to bytecode and execute it. Even using an IDE, it loses its fun after the 372 th time.

I would like to know if there is a product out there that features anything like an interactive console (I bet you need a JIT compiler) and some autocompletion (with relexivity, I suppose it's possible).

Maybe that's something very common that I just don't know about or something completely impossible, but its worst asking :-)


Solution 1:

Yes; jshell, and before that some close approximations are Groovy, Clojure, Scala, and the Bean Shell.

Solution 2:

Funnily enough, you get an interactive console with Jython ! You don't get much more Python-like.

Solution 3:

Java REPL http://www.javarepl.com/term.html

with an intellij plugin: http://plugins.jetbrains.com/plugin/7215?pr=