You can use reflections to change code behavior in runtime. It will not stay in the "jar", and at least while the classes you need are loaded, all will be well.
You need to, then, provide the mechanism to inject your changes using reflections in your program. Or that's the way I'd go about it, anyway.
Furthermore: the answer to this question has even more flexible options for runtime modding. If you use its third option, you can code in javascript (or other languages) (related info, a blog dedicated to scripting in java) using the facilities defined in JSR-223.