Self modifying code in Java
•
Java
Have you ever created or encountered self modifying code in Java?
Solution
Ignore the sad world, you may pass the self modified code (!) To guide you, in my opinion, there are three options:
>Use the built-in compiler to support Java 6 and write / recompile / reload classes > use the Apache BCEL bytecode operation library to write your classes directly > use the built-in scripting support of Java 6 (or use Apache BSF) to write methods in the JVM scripting language of your choice and execute these methods
Of the above three, my initial choice (if not required) will be view option 3 I suspect this is the least painful way to start I used all of the above - unfortunately, I can't publish links to client code
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码