1 21 22 package org.apache.derbyBuild; 23 24 import java.io.*; 25 import java.util.*; 26 27 38 39 public class maintversion2props 40 { 41 public static void main(String [] args) throws Exception 42 { 43 InputStream is = new FileInputStream(args[0]); 44 Properties p = new Properties(); 45 p.load(is); 46 String maint = ""; 47 if (args[0].indexOf("DBMS") > 0) 48 { 49 maint = p.getProperty("derby.version.maint"); 50 } else if (args[0].indexOf("release") > 0) 51 { 52 maint = p.getProperty("maint"); 53 } 54 Properties p2 = new Properties(); 55 p2.setProperty("interim", Integer.toString(Integer.parseInt(maint) / 1000000)); 56 p2.setProperty("point", Integer.toString(Integer.parseInt(maint) % 1000000)); 57 OutputStream os = new FileOutputStream(args[1]); 58 p2.store(os, ""); 59 } 60 } 61 | Popular Tags |