Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any Python-like interactive console for Java?

Tags:

java

console

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 :-)

like image 840
e-satis Avatar asked Apr 24 '09 19:04

e-satis


4 Answers

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

like image 184
Charlie Martin Avatar answered Nov 17 '22 09:11

Charlie Martin


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

like image 36
Brian Agnew Avatar answered Nov 17 '22 08:11

Brian Agnew


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

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

like image 12
David Portabella Avatar answered Nov 17 '22 09:11

David Portabella


Try Dr Java's "Interaction Pane".

like image 9
Harry Avatar answered Nov 17 '22 08:11

Harry