Manuel Lemos wrote:
>>Unless I'm mistaken, Java doesn't have eval. Any language with eval
>>needs a runtime environment when executing, even if the rest of the code
>>is converted to C
>
> I am not expert in Java (actually I don't program in Java - MetaL
> generates it for me if I ever need it), but I suppose that what eval
> does is what java.lang.Compiler class is for.
java.lang.compiler is a little different ...
1) Java *has* a complete runtime environment available at runtime,
the JVM and the standard classes, that's why JVMs tend to be so
big and have a rather large startup time overhead
2) java.lang.Compiler takes a java source file and compiles it
into a class file, so the result is persistent and you have
to have your code wrapped up to a complete class, write it
to filesystem, compile it, load the compiled class into the JVM
and then execute
eval just executes statements within the eingine, and what
you pass to it has to be just a complete statement, not a
whole class
--
Hartmut Holzgraefe [EMAIL PROTECTED] http://www.six.de +49-711-99091-77
Wir stellen f�r Sie aus auf der CeBIT 2002 und freuen uns
in Halle 6 auf Ihren Besuch am Stand H 18
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]