It is probably a bad idea to create code that changes itself and needs to be recompiled. For one thing, compiling takes time. If the project is large enough, the amount of time for recompiling can be significant. It would probably be better to use property files or some other scheme where the changing values can be stored. Can you be more specific about what you are trying to accomplish with this idea? I am willing to bet there is a simpler, and more elegent, solution instead of recompiling the code each time something changes.
Property files are the way to go. It's never a great idea to hardcode data into a program -- that's what files are for. If you've downloaded the free Java Tutorial from Sun (which I highly recommend doing if you haven't already), there's a tutorial on how to store and retrieve properties. If you've download the SDK, check the API docs, and the Sun free tutorial on J2EE.
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4 all those years ago...)