java server2000Á¬½ÓÊý¾Ý¿â
Ìõ¼þ£ºÒÑ°²×°J2SEºÍJ2EE¡£
Microsoft SQL Server 2000 Driver for JDBCÊÇ΢Èí¹«Ë¾Ãâ·ÑÌṩÃâ·ÑÏÂÔصÄÒ»¸öÈí¼þ£¬Çë·ÃÎÊ£º http://www.microsoft.com/sql/default.asp£¬ÏÂÔغóÎļþÃûΪ£ºsetup.exe£¬°²×°ºó£¬Ä¬ÈÏ·¾¶ÊÇ£º%Program Files%\Microsoft SQL Server 2000 Driver for JDBC£¬¸ÃĿ¼ÏÂLIBĿ¼ÀïÓÐ3¸öjarÎļþ¡£
msbase.jar
mssqlserver.jar
msutil.jar
°ÑÕâ3¸öÎļþ¿½±´µ½%J2EE_HOME%Îļþ¼ÐϵÄlib\system×ÓÎļþ¼ÐÏ¡£È»ºóÒªÐÞ¸ÄһЩJ2EEÆô¶¯µÄÅäÖòÎÊý¡£
¹Ø¼üÒ»µã£ºÒª¿´javaÇý¶¯ÀïÃæµÄÎļþ£¬ÓÒ»÷ÓÃwinRAR´ò¿ª£¬È»ºóÔÙ´ó³ÌÐòÀïÃæд
protected static String dbClassName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
protected static String dbUrl = "jdbc:microsoft:sqlserver://localhost:1433;"
+ "DatabaseName=db_JXC;SelectMethod=Cursor";
²»ÄÜËÀ¼Ç£¬
Ïà¹ØÎĵµ£º
JavaÈÝÆ÷ÀàÀà¿âµÄÓÃ;ÊÇ"±£´æ¶ÔÏó",²¢½«Æä»®·ÖΪÁ½¸ö²»Í¬µÄ¸ÅÄ
1£©Collection¡£Ò»¸ö¶ÀÁ¢ÔªËصÄÐòÁУ¬ÕâЩԪËض¼·þ´ÓÒ»Ìõ»ò¶àÌõ¹æÔò¡£List±ØÐë°´ÕÕ²åÈëµÄ˳Ðò±£´æÔªËØ£¬¶øSet²»ÄÜÓÐÖظ´ÔªËØ¡£Queue°´ÕÕÅŶӹæÔòÀ´È·¶¨²úÉúµÄ˳Ðò£¨Í¨³£ÓëËüÃDZ»²åÈëµÄ˳ÐòÏàͬ£©¡£
2£©Map¡£Ò»×é³É¶ÔµÄ”¼üÖµ¶Ô&ldqu ......
-
½üÈÕÔÚ±à³ÌÖÐÓõ½½Ó¿Ú֪ʶ,ÓÉÓڿα¾ÖжԽӿÚÃèÊö½ÏÉÙ,ËùÒÔÏë´ÓÍøÉϲéÕÒ×ÊÁÏ,µ«ÍøÉϵÄ×ÊÁÏ´ó¶àÒ²Ö»ÊÇÈß³¤µÄÃèÊö,ËùÒÔÔÚ´ËÌṩһ×Ô¼ºÐ´µÄʵÀý,¹©´ó¼Ò²Î¿¼:
ÔÌâÊÇÕâÑùµÄ£ºÔÚjavaÖУ¬¶¨ÒåÒ»¸ö½Ó¿Ú£¬ÉùÃ÷¼ÆË㳤·½ÐÎÃæ»ýºÍÖܳ¤µÄ³éÏó·½·¨£¬ÔÙÓÃÒ»¸öÀàȥʵÏÖÕâ¸ö½Ó¿Ú£¬ÔÙ±àдһ¸ö²âÊÔÀàȥʹÓÃÕâ¸ö½Ó¿Ú¡£
Ê×ÏÈ£¬½Ó¿Ú±ØÐ ......
1.StudentList.java:
/**
*
* @author lucifer
*/
package JavaSerializable;
import java.util.*;
import java.io.*;
public class StudentList implements Serializable{
Vector list = new Vector(6);
public StudentList(){} ......
»ñÈ¡classÀà·½·¨£º
1£¬getClass 2£¬Class.forName() 3,ÓÃ.class
public Field[] getDeclaredFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐÀàÐ͵ıäÁ¿£¬²»°üÀ¨¼Ì³Ð¸¸ÀàµÄ
public Field[] getDeclaredFields(String name)
·µ»ØÌض¨Ãû×Ö
public Field[] getFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐpublicÀàÐ͵ıäÁ¿£¬°üÀ¨¼Ì³Ð¸¸Àൠ......