/*先把下载的文件放在UpdateTemp文件夹中,待全部下载后,再把此文件夹中的文件移出替换旧文件*/
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Main.java
*
* Created on 2009-7-9, 22:29:27
*/
/**
*
* @author Administrator
*/
public class Main extends javax.swing.JFrame {
Connection cn=null;
MSConnection con=new MSConnection();
File file=null;
Vector vtFileName=new Vector();
int Process=0;
/** Creates new form Main */
public Main() {
initComponents();
this.setTitle("在线更新程序");
this.setVisible(true);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); //得到屏幕的尺寸
this.setLocation((screenSize.width)/2-150, (screenSize.height)/2-200);
// try {
// Thread.currentThread().sleep(10000);
// } catch (InterruptedException ex) {
// Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
// }
}
public void RunProgram(){
// String path=System.getProperty("user.dir"); //获取路径
try {
String OS = System.getProperty("os.name"); //获取当前操作系统,Windows or Linux
// String path=System.getProperty("user.dir"); //获