javaÁ¬½Ó¸÷ÖÖÊý¾Ý¿â·½Ê½ËÙ²é±í
javaÁ¬½Ó¸÷ÖÖÊý¾Ý¿â·½Ê½ËÙ²é±í1£®Oracle8/8i/9iÊý¾Ý¿â£¨thinģʽ£©Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orclΪÊý¾Ý¿âµÄSID
String user="test";
String password="test";
Connection conn= DriverManager.getConnection(url,user,password);2£®DB2Êý¾Ý¿âClass.forName("com.ibm.db2.jdbc.app.DB2Driver ").newInstance();
String url="jdbc:db2://localhost:5000/sample"; //sampleΪÄãµÄÊý¾Ý¿âÃû
String user="admin";
String password="";
Connection conn= DriverManager.getConnection(url,user,password);3£®Sql Server7.0/2000Êý¾Ý¿âClass.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb";
//mydbΪÊý¾Ý¿â
String user="sa";
String password="";
Connection conn= DriverManager.getConnection(url,user,password);4£®SybaseÊý¾Ý¿âClass.forName("com.sybase.jdbc.SybDriver").newInstance();
String url =" jdbc:sybase:Tds:localhost:5007/myDB";//myDBΪÄãµÄÊý¾Ý¿âÃû
Properties sysProps = System.getProperties();
SysProps.put("user","userid");
SysProps.put("password","user_password");
Connection conn= DriverManager.getConnection(url, SysProps);5£®InformixÊý¾Ý¿âClass.forName("com.informix.jdbc.IfxDriver").newInstance();
String url = "jdbc:informix-sqli://123.45.67.89:1533/myDB:INFORMIXSERVER=myserver;
user=testuser;password=testpassword"; //myDBΪÊý¾Ý¿âÃû
Connection conn= DriverManager.getConnection(url);6£®MySQLÊý¾Ý¿âClass.forName("org.gjt.mm.mysql.Driver").newInstance();
String url ="jdbc:mysql://localhost/myDB?user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1"
//myDBΪÊý¾Ý¿âÃû
Connection conn= DriverManager.getConnection(url);7£®PostgreSQLÊý¾Ý¿âClass.forName("org.postgresql.Driver").newInstance();
String url ="jdbc:postgresql://localhost/myDB" //myDBΪÊý¾Ý¿âÃû
String user="myuser";
String password="mypassword";
Connection conn= DriverManager.getConnection(url,user,
Ïà¹ØÎĵµ£º
Ò»£º×¼±¸ www.savarese.org download
1. rocksaw-1.0.0-src.tar.gz
2. vserv-tcpip-0.9.2-src.tar.gz
¶þ£º±àÒëÔ´ÎļþµÃµ½jar°ü ʹÓÃAnt
1. build vserv-tcpip-0.9.2-src
ÔÚvserv-tcpip-0.9.2Ŀ¼ÏÂÃ潨һ¸ötestsĿ¼£¬È»ºóÔÚcmd´°¿ÚϽøÈë ......
JavaµÄ»·¾³±äÁ¿ÅäÖãº
(Á½ÖÖ·½·¨ÈÎÑ¡Ò»ÖÖ½Ô¿É)
·½·¨Ò»£º
ÒÀ´Îµã»÷£º“ÎҵĵçÄÔ”£(ÓÒ¼ü)“ÊôÐÔ”£“¸ß¼¶”£“»·¾³±äÁ¿”£¬µ¯³öWindowsµÄ“»·¾³±äÁ¿”ÅäÖÿ¨¡£
Ôړϵͳ±äÁ¿”À¸ÏÂÖ´ÐÐÈýÏî²Ù×÷£º
¢Ùн¨“Classpath”(Èç¹ûÒÑÓУ¬ÔòÖ±½Ó ......
JAVAÐòÁл¯µÄÁ½ÖÖ·½Ê½
//´ó¼Ò¶¼ÖªµÀSerializableÊÇÒ»¸ömark interface,¸æËßJVMÕâ¸ö¶ÔÏó¿ÉÒÔ±»×ª»»³É¶þ½øÖÆÁ÷À´´«Êä.
//Serializable ÔÚÎÒÃÇʵÏÖÕâ¸ö½Ó¿ÚµÄʱºò,ÎÒÃÇ¿ÉÒÔʹÓÃ4¸ö˽Óз½·¨À´¿ØÖÆÐòÁл¯µÄ¹ý³Ì:
//ÎÒÃÇÀ´¿´Ò»¸öÀý×Ó:
public class FooImpl implements java.io.Serializable
{
pr ......
JavaÓïÑԵĹؼü×Ö£¬ÓÃÀ´±íʾһ¸öÓò²»ÊǸöÔÏó´®Ðл¯µÄÒ»²¿·Ö¡£µ±Ò»¸ö¶ÔÏó±»´®Ðл¯µÄʱºò£¬transientÐͱäÁ¿µÄÖµ²»°üÀ¨ÔÚ´®Ðл¯µÄ±íʾÖУ¬È»¶ø·ÇtransientÐ͵ıäÁ¿ÊDZ»°üÀ¨½øÈ¥µÄ
¡¡¡¡Java´úÂë
¡¡¡¡class A implements Serializable {
¡¡¡¡private String name;
¡¡¡¡transient private String address;
¡¡¡¡}
¡¡¡¡ÄÇÃ´Ä ......