• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

interactive Java?

 
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at http://drjava.sourceforge.net/
 
M Beck
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic