Self modifying code in Java -
Have you ever made or faced it in Java? If so, please post the link or just post the code.
Ignore the world of grief, creating self through the modified code (!) I think there are 3 options:
- Use the inbuilt compiler support of Java 6 and write / re-compile / reload sections
- directly to your square Use Apache Bytecode Manipulation Library to write
- Inbuilt scripting support for Java 6 (or use Apache) Use the write methods in your JVM scripting language, and execute these
The three above, in the absence of my initial choice (required) option would be to take a look at 3. I suspect that this is the least painful way to start. I have used all of the above - unfortunately I can not post links to client code
Comments
Post a Comment