1

Possible Duplicate:
Java REPL shell

Hey,

Is there any way to execute Java code (as you type) on a command line?

For instance, something like this

(command line)
java

import ARDrone;
ARDrone drone = new ARDrone(null, null, null);

drone.takeoff();

(so that you can enter lines of code in the command line)

Community
  • 1
  • 1
Christian Stewart
  • 15,217
  • 20
  • 82
  • 139
  • 3
    See [Java REPL shell](http://stackoverflow.com/questions/2636044/java-repl-shell). –  Dec 11 '10 at 18:31

2 Answers2

2

You are looking for an interpreter.

Google tells me that BeanShell appears to be one, although I don't know Java and have never heard of BeanShell.

Katriel
  • 120,462
  • 19
  • 136
  • 170
2

Groovy can do that. It's possible with java syntax and groovy syntax.

You can try at Groovy web console. You have also groovy console and groovy shell.

Istao
  • 7,425
  • 6
  • 32
  • 39