1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
public class testjava {
static DatagramSocket socketReceive1 = null,socketReceive2 = null,socketReceive3 = null;
static String url = "jdbc:mysql://172.16.80.58:3306/magmatic";// URL de connexion
static String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
static SGBD db = new SGBD(driver);
static Connection con = null;
//private static ResultSet rs = null;
static Locale locale = Locale.getDefault();
//Constructeur pour connexion a la base de données
public testjava(){
con = db.open(url, "root", "admcira");
}
public static void main(String[] args){
testjava T1 = new testjava();
int delay = 0;
int period = 10;
Timer timer = new Timer();
timer.scheduleAtFixedRate(new TimerTask() {
public void run() {
//try {
API_Mobile_MAJ_SQL_vers_API(1,1);
API_Mobile_MAJ_SQL_vers_API(1,2);
API_Mobile_MAJ_SQL_vers_API(1,3);
API_Mobile_MAJ_SQL_vers_API(1,4);
API_Mobile_MAJ_SQL_vers_API(2,1);
API_Mobile_MAJ_SQL_vers_API(2,2);
}
}, delay, period);
} |
Partager