Reputation: 2270
I spent the last year doing Ruby development, and during that time I discovered irb, which makes running little "code experiments" easy and fun. I've recently switched teams and am now doing Java development, and I've found that I really miss my irb window. I would like to do the same thing for Java, but I don't know how.
I'm using Eclipse (groan), but Eclipse's bells and whistles are not the same thing.
Upvotes: 17
Views: 5088
Reputation: 1298
Tried JShell and beanshell. Do suggest JShell over beanshell. Up key will roll back to history lines. Display much user friendly.
Thank you @Anders Sandvig
It can be found in jdk since java 9.
Upvotes: 0
Reputation: 20986
Old question, I know, but jshell: The Java Shell (Read-Eval-Print Loop), is coming in Java 9 (Summer 2017, hopefully).
Upvotes: 5
Reputation: 5477
BeanShell is probably what you're looking for.
https://github.com/beanshell/beanshell
Upvotes: 22
Reputation: 24262
Would "Use an Eclipse Java Scrapbook page" be better ;-)
I haven't actually used irb, but if you just want to run code snippets inside of eclipse, then this is a simple way of doing it.
Upvotes: 4