File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

interactive Java?

 
M Beck
Ranch Hand
Posts: 323
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does anybody know of an interactive Java environment, down the lines of old Lisp environments or scripting languages like Perl or Python? something where i could type Java expressions and statements into a command line, and have them byte-compiled and evaluated immediately? it'd help my coding a lot.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is a compiled language, not an interpreted one.
Therefore you can't have an interactive environment.

You might be able to create a Java interpreter, but creating one that causes code to behave in the exact same way as compiled code would be extremely difficult.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "BeanShell" package does a pretty good job of this; it's incorporated in a number of different other tools. See http://www.beanshell.org/ .
 
M Beck
Ranch Hand
Posts: 323
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BeanShell does indeed look like it'll do the job. not quite as close to the compiled language as i might like, but close enough. thanks!
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at http://drjava.sourceforge.net/
 
M Beck
Ranch Hand
Posts: 323
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DrJava's "interaction pane" seems to work even better than BeanShell for me. it's a larger download, since DrJava is a fairly complete IDE with a lot of bells and whistles beside just the interactive evaluation prompt, but it's still reasonably small, and the language interpreted at that command line seems to be a bit closer to "proper" Java than what BeanShell implements. after evaluation, i suspect i'll end up sticking with DrJava. thanks everyone!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic