posted 21 years ago
I'm writing an executable Jar file which contains one class (to FTP data to another machine) and one properties file (which contains amonsgst other things a unique sequence number to go in each new filename).
Each time the Jar executes, the last thing it must do is increment the sequence number by one. Unfortunately I can't do this while it's in the Jar file. I know of a method whereby you create a temp jar file, add your new entry then copy the remaining files. Finally you would delete the original and then rename the temp.
Which would be great if I didn't have a lock on the jar file because it's being used to run the program in the first place.
D'oh!
So, to cut a long story short - Is it possible to update one file (ie overwrite an existing entry) in an executing jar without having to rewrite the entire thing?
Many thanks
[ June 19, 2002: Message edited by: James Mills ]