Specifically: how can I modify java.lang.Object.clone so that the JVM doesn’t squawk when bytecode calls it?
Specifically: how can I modify java.lang.Object.clone so that the JVM doesn’t squawk when bytecode
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Peter Lawrey’s comment gave the idea of editing
rt.jar. This works. It is also utterly harmless.(changed access modifier code
0x0104to0x0101at the right place inrt.jar/java/lang/Object.class)Similarly, one can construct an
rtplus.jarcontaining just the modified class file and use-Xbootclasspath/p:rtplus.jarto havejavause that version instead. (and yes, EJP, we can’t distribute thatrtplus.jarbut it’s quite easy to generate programmatically)