As java programmer know that program made under java are converted to jar file for usage... And an updation in any class require that jar to be updated. So is there any way that we can update the class file at runtime rather then whole jar file. I want to provide update facility to user.

don't do that, you have to calculate with byte lenght in compiled code, in Java this warnigs starting if you received error about Incompatible magic value, and another ZOO,

but in other hands if you'll will learn more about PL's, then you'll able to change all variables declared (valid for majorities of PL) as String someString = "SomeValue";

way that we can update the class file at runtime rather then whole jar file. I want to provide update facility to user.

Are you looking for a utility to replace a class file that is in a jar file with another version of that class file?
I haven't seen one, but I did see a post on a forum somewhere where the OP was trying to write just such a utility.

@NormR1, Is there any utility which can change the class file in jar during runtime? Can u please post the link
@mKorbel sorry i didnt get your second line.

Edited 5 Years Ago by Majestics: n/a

I don't know if you can change a jar file while executing a class that is contained in that jar file. There could be a problem.
I have no idea if the OP that was working on his utility got it to work.

This article has been dead for over six months. Start a new discussion instead.