javaÁ¬½Ó¸÷ÖÖÊý¾Ý¿âµÄÅäÖÃÎļþд·¨£¨×ª£©
²Î¿¼ÅäÖÃÎļþ
# ʾÀýÅäÖòο¼£¬º¸Ç¼¸ºõËùÓеÄÖ÷Á÷Êý¾Ý¿â
############# OracleÊý¾Ý¿â ########################
# Êý¾Ý¿âÇý¶¯Ãû
driver=oracle.jdbc.driver.OracleDriver
# Êý¾Ý¿âURL(°üÀ¨¶Ë¿Ú£©
dburl=jdbc:oracle:thin:@127.0.0.1:1521:zvfdb
# Êý¾Ý¿âÓû§Ãû
user=root
# Óû§ÃÜÂë
password=zvfims
############# DB2Êý¾Ý¿â ########################
# Êý¾Ý¿âÇý¶¯Ãû
driver=com.ibm.db2.jcc.DB2Driver
# Êý¾Ý¿âURL(°üÀ¨¶Ë¿Ú£©
dburl=jdbc:db2://127.0.0.1:50000/zvfdb
# Êý¾Ý¿âÓû§Ãû
user=root
# Óû§ÃÜÂë
password=zvfims
############# MySQLÊý¾Ý¿â ########################
# Êý¾Ý¿âÇý¶¯Ãû
driver=com.mysql.jdbc.Driver
# Êý¾Ý¿âURL(°üÀ¨¶Ë¿Ú£©
dburl=jdbc:mysql://127.0.0.1:3306/zvfdb
# Êý¾Ý¿âÓû§Ãû
user=root
# Óû§ÃÜÂë
password=zvfims
############# PostgreSQLÊý¾Ý¿âÊý¾Ý¿â ########################
# Êý¾Ý¿âÇý¶¯Ãû
driver=org.postgresql.Driver
# Êý¾Ý¿âURL(°üÀ¨¶Ë¿Ú£©
dburl=jdbcostgresql://127.0.0.1/zvfdb
# Êý¾Ý¿âÓû§Ãû
user=root
# Óû§ÃÜÂë
password=zvfims
############# SQLServer2000Êý¾Ý¿â ########################
# Êý¾Ý¿âÇý¶¯Ãû
driver=com.microsoft.jdbc.sqlserver.SQLServerDriver
# Êý¾Ý¿âURL(°üÀ¨¶Ë¿Ú£©
dburl=jdbc:microsoftqlserver://127.0.0.1:1433;DatabaseName=zvfdb
# Êý¾Ý¿âÓû§Ãû
user=root
# Óû§ÃÜÂë
password=zvfims
############# SQLServer2005Êý¾Ý¿â ########################
# Êý¾Ý¿âÇý¶¯Ãû
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
# Êý¾Ý¿âURL(°üÀ¨¶Ë¿Ú£©
dburl=jdbc:sqlserver://127.0.0.1:1433;DatabaseName=zvfdb
# Êý¾Ý¿âÓû§Ãû
user=root
# Óû§ÃÜÂë
password=zvfims
############# InformixÊý¾Ý¿âÊý¾Ý¿â ########################
# Êý¾Ý¿âÇý¶¯Ãû
driver=com.informix.jdbc.IfxDriver
# Êý¾Ý¿âURL(°üÀ¨¶Ë¿Ú£©
dburl=jdbc:informix-sqli://127.0.0.1:1533/zvfdb
#&
Ïà¹ØÎĵµ£º
java´úÂëÓÅ»¯±à³Ì
1.JVM ¹ÜÀíÁ½ÖÖÀàÐ͵ÄÄÚ´æ:¶ÑÄÚ´æ(heap),Õ»ÄÚ´æ(stack),¶ÑÄÚÔÚÖ÷ÒªÓÃÀ´´æ´¢³ÌÐòÔÚÔËÐÐʱ´´½¨»òʵÀý»¯µÄ¶ÔÏóÓë±äÁ¿.¶øÕ»ÄÚ´æÔòÊÇÓÃÀ´´æ´¢³ÌÐò´úÂëÖÐÉùÃ÷Ϊ¾²Ì¬(static)(»ò·Ç¾²Ì¬)µÄ·½·¨.
2.JVM ÖжÔÏóµÄÉúÃüÖÜÆÚ,´´½¨½×¶Î,Ó¦Óý׶Î,²»¿ÉÊӽ׶Î,²»¿Éµ½´ï½×¶Î,¿ÉÊÕ¼¯½×¶Î,ÖÕ½á½×
¶Î,ÊͷŽ׶Î
3.±ÜÃâÔÚÑ ......
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¡¢DB ......
¶àÏ̳߳ÌÐò
¶ÔÓÚ¶àÏ̵߳ĺô¦Õâ¾Í²»¶à˵ÁË¡£µ«ÊÇ,ËüͬÑùÒ²´øÀ´ÁËijЩеÄÂé·³¡£Ö»ÒªÔÚÉè¼Æ³ÌÐòʱÌرðСÐÄÁôÒâ,¿Ë·þÕâЩÂé·³²¢²»ËãÌ«À§ÄÑ¡£
(1)ͬ²½Ïß³Ì
Ðí¶àÏß³ÌÔÚÖ´ÐÐÖбØÐ뿼ÂÇÓëÆäËûÏß³ÌÖ®¼ä¹²ÏíÊý¾Ý»òе÷Ö´ÐÐ״̬¡£Õâ¾Í ÐèҪͬ²½»úÖÆ¡£ÔÚJavaÖÐÿ¸ö¶ÔÏó¶¼ÓÐÒ»°ÑËøÓëÖ®¶ÔÓ¦¡£µ«Java²»Ìṩµ¥¶ÀµÄlockºÍunlock²Ù×÷¡£ ......
import java.util.*;
import java.text.*;
/**
* a <code> DateTime </code> ¶¨ÒåÁËÈÕÆÚʱ¼äµÄһЩ±ã½ÝµÄ¸ñʽ»¯²Ù×÷
*
* @version 1.0
* @author markhuang
*/
public class DateTime {
/**
* ´æ´¢Ê±¼äºÍÈÕÆÚ£¬Ä¬Èϵ±Ç°Ê±¼äºÍÈÕÆÚ
*/
// private Calendar cale = Calendar.getInstance ......
¡¡1. String.trim()
¡¡¡¡trim()ÊÇÈ¥µôÊ×β¿Õ¸ñ
¡¡¡¡2.str.replace(" ", ""); È¥µôËùÓпոñ£¬°üÀ¨Ê×β¡¢Öмä
¡¡String str = " hell o ";
¡¡¡¡String str2 = str.replaceAll(" ", "");
¡¡¡¡System.out.println(str2);
¡¡¡¡3.»òÕßreplaceAll(" +",""); È¥µôË ......