Click to See Complete Forum and Search --> : Dynamically Generated Compiled Code
Crunchy Cat
Apr 18th, 2006, 07:41 PM
Hi folks,
Is there a way to dynamically generate compiled code? I am after what can be done with reflection but without the performance cost. It seems logical that a good way to accomplish the goal is to compile code at run-time.
Thoughts? Successes? Ideas?
System_Error
Apr 19th, 2006, 09:22 AM
Sounds like an interpreter... Performance cost will be present.
Crunchy Cat
Apr 19th, 2006, 11:57 AM
Using reflection is an interpreter and does come with a performance cost. What I am looking for is potentially a way to construct Java code on the fly and pass it to something that will translate it into byte-code for later use... or anything that comes close to that.
System_Error
Apr 19th, 2006, 12:38 PM
Isn't that the same thing that already happens, though?
Crunchy Cat
Apr 19th, 2006, 04:56 PM
You're right that does happen. The part that I failed to mention is that I would want to retain that compiled code and potentially execute it many times without having to reinterpret it. Hope that clarifies things a touch.
Crunchy Cat
Apr 19th, 2006, 10:18 PM
Found what I was looking for:
http://java.sys-con.com/read/36843.htm
Thanks.
manavo11
Apr 28th, 2006, 05:16 PM
You can resolve the thread by clicking on the Thread Tools menu and selecting "Mark Thread Resolved".
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.