Delete previous jar file before writing a new one just in case

This commit is contained in:
Shevchik 2013-12-14 15:00:52 +04:00
parent 424f6e5daa
commit cc993188fe

View File

@ -64,6 +64,7 @@ public class GenVehicleArrowClass {
File arrowfile = new File("VehicleArrow.class"); File arrowfile = new File("VehicleArrow.class");
InputStream arrwoinputstrean = new FileInputStream(arrowfile); InputStream arrwoinputstrean = new FileInputStream(arrowfile);
File jarfile = new File("VehicleArrow.jar"); File jarfile = new File("VehicleArrow.jar");
jarfile.delete();
final ZipOutputStream zipout = new ZipOutputStream(new FileOutputStream(jarfile)); final ZipOutputStream zipout = new ZipOutputStream(new FileOutputStream(jarfile));
ZipEntry entry = new ZipEntry(arrowfile.getName()); ZipEntry entry = new ZipEntry(arrowfile.getName());
zipout.putNextEntry(entry); zipout.putNextEntry(entry);