Possible Duplicate:
Java REPL shell
Is there a project that makes a command prompt that can execute Java statements? Why not? I'm looking for something like the builtin shell of Python but for Java.
I see there is http://www.beanshell.org/ but that project does not seem very active. But it appears to be what I'm looking for. Are there any other projects like this?
I want to be able to do something like this
$ import org.foobar.Bletch
$ new Bletch();
or similar. Has anyone done this?
You could always use a Clojure REPL - I do this for dynamically playing with Java objects at runtime.
(import 'my.package.SomeClass)
(def a (new SomeClass))
(.methodName a arg1 arg2)
Works pretty well as long as you know the Clojure syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With