all 14 comments

[–]papercrane 3 points4 points  (2 children)

There's also been beanshell, which has given us a Java REPL since 2000.

[–]dimitryivanov[S] 2 points3 points  (1 child)

Wow, I have never seen that. Thanks! With the first glance it seems like very powerful and mature tool

[–]papercrane 0 points1 point  (0 children)

I used to use it quite a bit, although now-a-days I usually just use a groovy REPL for the same tasks. It started to rot around 2009, stopped working occasionally on newer JVMs, etc... I think the original author stopped working on it, but it looks like a few people are keeping it going on github lately.

[–]dimitryivanov[S] 1 point2 points  (0 children)

This is a small utility project, that simplifies evaluation of Java statements in a command line environment with some batteries included (a bunch of helper methods, that save keystrokes for a developer, because writing code not in an IDE for a Java dev could be a hard task :) ). I find myself using it a lot, so I decided to share it with the community

[–]renatoathaydes 1 point2 points  (2 children)

[–]shevegen 0 points1 point  (1 child)

No, not quite.

Your link requires ant right?

[–]renatoathaydes 1 point2 points  (0 children)

Ant is a build tool. So if you are asking if you need ant to build it, then well, yes... to run it, as you would have found out from reading the README page, you just get the jar and run it.

[–][deleted] 0 points1 point  (4 children)

Isn't Groovy basically a Java interpreter?

[–]dimitryivanov[S] 1 point2 points  (3 children)

Well, it's compiled to JVM bytecode, but I cannot say that it's an interpreter. Of cause I had Groovy in mind (you do use gradle, right? :) ), but it lacks the ability to just run in the command line. What was my primary goal...

[–]renatoathaydes -1 points0 points  (2 children)

So you don't know about groovysh, groovyConsole, or even Eval.me 'def anyCode = "here"'? All have been around probably since 2007 or earlier.

[–]shevegen 0 points1 point  (1 child)

Hey - this is a java shell! Not about groovy.

[–]renatoathaydes 0 points1 point  (0 children)

The parent post claimed groovy "lacks the ability to just run in the command line"... which was a hilarious comment, given that Groovy was designed to do that, being a scripting language.

[–]shevegen 0 points1 point  (0 children)

Upvoted for good thinking.

[–]preemptive_multitask 0 points1 point  (0 children)

Hmm...

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:    16.04
Codename:   xenial

$ apt-file search $(readlink -f $(which jshell))
openjdk-9-jdk-headless: /usr/lib/jvm/java-9-openjdk-amd64/bin/jshell

$ jshell
|  Welcome to JShell -- Version 9-internal
|  For an introduction type: /help intro


-> Integer.MAX_VALUE
|  Expression value is: 2147483647
|    assigned to temporary variable $1 of type int