Hi all,
I need to write a simple Java applet that can receive java code,interpret it and display the output. Is there any Java package for Java-interpretation I can use in my applet to do that?
thanks in advance,
ArielS
Printable View
Hi all,
I need to write a simple Java applet that can receive java code,interpret it and display the output. Is there any Java package for Java-interpretation I can use in my applet to do that?
thanks in advance,
ArielS
- Just read the String/file with Java code and print it out in applet;Quote:
a simple Java applet that can receive java code,interpret it and display the output
- Adding word "simple" won't make the task such, code parsers are never simple;
I know parsing code, especially for a rich language such as Java ,is more than just a simple task. What I meant was I want to write an applet that all it does is receives code from the user by String / File, uses some existing (hopefully) Java-interpretation tool and displays the output of the given code. My hope is that such package exists, with some static methods allowing me to do something like:
String code = ...
String output = JavaInterpreter.interpret(code);
(And maybe throws exceptions when the code has problems).
I don't understand your first point: "Just read the String/file with Java code and print it out in applet" - how exactly can it help me achieve my goal?