用java程序清空Mybase5.5.1的试用期

每次都要去修改ini文件恢复30天的试用期,麻烦,写了个jar程序,双击能恢复,稍微方便一点点,编译的可执行jar放到mybase的安装目录下运行即可

 

package com.ericahdu.mybasePatch; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; public class MainPatch { public static void main(String args[]) throws IOException{ File iniFile = new File("nyfedit.ini"); Scanner sIni = new Scanner(iniFile); ArrayList iniContext = new ArrayList(); while(sIni.hasNextLine()){ iniContext.add(sIni.nextLine()); } sIni.close(); iniFile.delete(); BufferedWriter iniWriter = new BufferedWriter(new FileWriter(iniFile,true)); for(int i=0;i

你可能感兴趣的