|
-
April 18th, 2010, 02:25 PM
#1
Java interpreter in Java
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
-
April 19th, 2010, 04:13 PM
#2
Re: Java interpreter in Java
a simple Java applet that can receive java code,interpret it and display the output
- Just read the String/file with Java code and print it out in applet;
- Adding word "simple" won't make the task such, code parsers are never simple;
Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)
//always looking for job opportunities in AU/NZ/US/CA/Europe :P
willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));
USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!
-
April 20th, 2010, 01:38 AM
#3
Re: Java interpreter in Java
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|