java Ï̳߳Ø
Ðí¶àʱºòÎÒÃÇÐèÒªÓõ½Ïß³Ì ±ÈÈçÏ£ÍûÒ»¸ö¸½¼ÓµÄ¹¦ÄÜ ²»ÒªÓ°ÏìÕû¸öÁ÷³ÌµÄ¹¦ÄÜ£¬±ÈÈçij¸öÁ÷³ÌÐèÒª¼ÓÈëÈÕÖ¾£¬µ«ÊDz»Ï£Íû¼Ç¼ÈÕÖ¾µÄ¹¦ÄÜÓ°ÏìÕû¸öÁ÷³ÌµÄÐÔÄÜ£¬²»ÄÜÒòΪ¼Ç¼ÈÕÖ¾°ÑÕû¸öÁ÷³Ì¸ø¿¨×¡ÁË¡£ÔÚÕâ¸öÖÖÇé¿öÏ£¬ÎÒÃÇÐèҪʹÓÃÏ̡߳£ÈüǼÈÕÖ¾ÔÚµ¥¶ÀÒ»¸öÏß³ÌÀïÃæÅÜ£¬¾Í²»»áÓ°Ï춼ÆäËûÁ÷³ÌÁË¡£
ÔںܶàʱºòÎÒÃÇ»¹ÊÇʹÓÃÏ̳߳صģº ÔÚÏÂÃæµÄÀý×ÓÊÇ Ôڹ涨µÄʱ¼äÄÚÅжÏÊý¾Ý¿âÊÇ·ñÁ¬½Ó³É¹¦¡£
Ò»¸öÏß³ÌÓÃÓÚÁ¬½ÓmysqlµÄÀà £º
package db;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.util.Properties;
public class ConnMysql implements Runnable {
private static String connS=null;
public Connection getMysqlConn() {
String mysqlDBDriver = "com.mysql.jdbc.Driver";
String msqlUrl = "jdbc:mysql://203.175.156.78:3306/client";
Connection mysqlConn = null;
try {
DriverManager.registerDriver((Driver) Class.forName(mysqlDBDriver).newInstance());
Properties oDbProps1 = new Properties();
oDbProps1.put("user", "root");
oDbProps1.put("password", "root");
mysqlConn = DriverManager.getConnection(msqlUrl, oDbProps1);
} catch (Exception e) {
e.printStackTrace();
}
return mysqlConn;
}
public void run() {
connS=getMysqlConn().toString();
}
public static String getConnS() {
return connS;
}
}
ÁíÒ»¸öÏß³ÌÓÃÓÚ¼ÇʱµÄÒ»¸öÀà £º
package db;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class GetTime implements Runnable {
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
private String nowTime = sdf.format(new Date());
private static long disT = 0;
private static int num = 0;
public int getShijianchai() {
int between = 0;
try {
Date begin = sdf.parse(nowTime);
Date end = sdf.parse(this.getLastTime());
between = (int) ((end.getTime() - begin.getTime()) / 1000);//
Ïà¹ØÎĵµ£º
ÎÒÃÇÔÚjspÒ³ÃæÉϵÄjs½Å±¾ÖпÉÒÔµ÷ÑÐjava´úÂ룬±ÈÈ磬ÎÒÃÇÐèÒªÔÙjsÖÐÓÃalertº¯ÊýÏÔʾ·þÎñÆ÷¶Ë·¢Ë͹ýÀ´µÄij¸ö×Ö·û´®ÄÇôÎÒÃÇ¿ÉÒÔÕâÑù×ö
tomcat주
ÔÚ·þÎñÆ÷¶ËÎÒÃÇÓÐrequest.setAttribute("name","abc");
ÄÇôÎÒÒªÔÚÒ³ÃæÉÏÓÃalertÏÔʾµÄ»°£¬ÓÐÁ½ÖÖ·½Ê½£º
1¡¢Ê¹ÓÃEL±í´ïʽ
ÔÚEl±í´ïʽµÄÍâÃæÓÃÒýºÅ¼´¿É£º
<scri ......
ÓÐЩʱºò,ҪдһЩ³ÌÐò,ÔÚ JAVA ÀïÃæºÃÄÑʵÏÖ, µ«Èç¹ûʹÓÃÆäËü±à³ÌÓïÑÔÈ´ÓֱȽÏÈÝÒ×ʱ,ÎÒÃDz»·Áͨ¹ý JNI À´Èò»Í¬ÓïÑԵijÌÐò¹²Í¬Íê³É.
JNI µÄ½Ì³Ì, ÍøÉÏ C µÄ±È½Ï¶à,Java Ò²ÌṩÁË javah.exe Ϊ C ÓïÑ﵀ JNI ³ÌÐòÉú³ÉÍ·Îļþ, Èç¹ûÄãÊÇÒ»¸ö Delphi ±à³ÌÔ±, ÄÜ·ñÈà JAVA Óë Delphi ³ÌÐò½»»¥ÄØ? ´ð°¸Êǿ϶¨µÄ,½ñÌìÎÒÃǾÍÀ´ ......
1.½Ó¿ÚµÄ¶¨Ò壺
interface ½Ó¿ÚÃû
{ ½Ó¿ÚÌ壻 }
×¢Ò⣺½Ó¿ÚÌåÖÐÖ»ÄÜ°üº¬³£Á¿¶¨ÒåºÍ·½·¨¶¨ÒåÁ ......