Re: Running javascript expression in java program



On 4 May 2006 21:55:29 -0700, ahjiang@xxxxxxxxx wrote, quoted or
indirectly quoted someone who said :

String result = evalExpression(" "Hello World".toUpperCase() ");

Java has no eval, but I think JPython does, and possibly Ruby. You
could use on-the-fly compilation to cook one up for Java.

see http://mindprod.com/jgloss/eval.html
see http://mindprod.com/jgloss/onthefly.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.



Relevant Pages

  • Re: Confirm my Performance Test Against Java?
    ... language choice or even hardware. ... I often hear that Ruby is "fast enough" or that the performance ... a java environment my team has built provides SOAP/REST ... our average server side response time is something we ...
    (comp.lang.ruby)
  • Re: Ruby vs Java vs c++
    ... I have rather a lot of experience with Java, and it's not easy to avoid the ... if the program has a GUI. ... Ruby, by contrast, uses native-code GUI libraries, so it tends to be faster ... latter two languages are a better choice for learning programming ...
    (comp.lang.ruby)
  • Ruby/Java strings solved the Ruby way
    ... the general Ruby community. ... Java integration layer. ... and a *lot* of overhead in the String case. ... The coercion cost for strings is at least O. ...
    (comp.lang.ruby)
  • Re: Sun hires JRuby developers.
    ... Ruby experience - it's not an obvious good idea. ... Since Java pays my bills, I wouldn't complain if JRuby brought benefits on that side of the fence. ... 1.5s Swing looks passable until you heavens forbid change font resolution in Windows to Large fonts, ... Ruby works most of the time if you get all your dependency maintainers to provide Windows DLLs and your deployment boxes have gcc and devel libs to compile extensions. ...
    (comp.lang.ruby)
  • Re: Miscellanous Language Ranting (was Re: For performance, write it in C - Part 2, comparing C,
    ... I don't have to unlearn the parts of Perl that are common to Ruby. ... many people being attracted first to it then, by way of Rails, to Ruby ... marketing Java has received, rather than because Java was the Right Tool ... I think Java was chosen for its portability and for its convenient GUI. ...
    (comp.lang.ruby)