Re: Can I change the contents of a class file externally
Wednesday, June 13, 2001 03:56 AM
Yes it's possible, but for those things you should use property file (something like a .ini configuration file) to store changeable data outside the class (i.e. error messages). You are not free at all to make any binary change in a class file because, loading the class, the JVM performs a validity verification of the bytecode, and you can make easily a corrupted class. Personally, I consider an ugly practice to change executable binary files, not only in Java platform. This kind of hacks can reveal dangerous aspects that can make your app to fail.