ĿǰÒÔEclipseΪÖ÷µÄÖØÁ¿¼¶¿ª·¢¹¤¾ß´óÐÐÆäµÀ.ËäÈ»¼«Îª·½±ã.µ«Èí¼þ°²×°¶ÔÓÚϵͳÅäÖò»¸ßµÄµçÄÔ»òÕßСÏîÄ¿¿ª·¢·Ç³£²»Àû.ÔÚÒÆÖ²¹ý³ÌÖл¹ÓÐÅäÖÃÎÊÌâ.±È½ÏÂé·³.Òò´Ë¶ÔÓÚһЩ³¬Ð¡ÏîÄ¿,ʹÓÃÇáÁ¿¼¶µÄ¿ª·¢·½·¨,ÏÔµÃÓÉΪ±ØÒª.Ëùν³¬ÇáÁ¿¼¶,¾ÍÊÇÓÃ×î¼òµ¥µÄ¹¤¾ßÍê³ÉJAVAϵͳµÄ¿ª·¢.ÔÚ¿ª·¢µ±ÖÐÒ²¿ÉÒÔÁ˽âJAVAµÄ±àÒëÔËÐз½·¨.Á˽âÀ´ÁúÈ¥Âö.ÁíÍâ²»ÖÁÓÚÒ»Ììµ½ÍíÌýÓ²ÅÌÏì.
Ò».¿ª·¢»·¾³
¿ª·¢¹¤¾ß:¼Çʱ¾(UtralEdit) + JDK1.6
¿ª·¢Ä£Ê½:JSP+JavaBean
ƽ̨:APACHE-TOMCAT+JDK1.6+WIN32
¶þ.»·¾³ÅäÖü°ËµÃ÷
ÉèÖû·¾³±äÁ¿(ÎҵĵçÄÔ-¸ß¼¶-»·¾³±äÁ¿[¿ÉÒÔ½«µ±Ç°µçÄԵĻ·¾³±äÁ¿Éè½øÈ¥,Ò²¿ÉÖ»ÉèÖøöÈ˵Ļ·¾³±äÁ¿])
PATH E:\JDK\bin (ÒòΪBINĿ¼ÏÂÓÐJAVA.exe ¼ÓÈëÊÇΪÁË¿ÉÒÔÔËÐÐJAVAÃüÁî)
JAVA_HOME E:\JDK(×ÜÈÃÎÒÏëÆðUNIXϵÄORACLE_HOME)
CLASSPATH CLASSPATH=.;E:\JDK\lib\tools.jar;E:\JDK\lib\dt.jar ;(Õâ¸öÊÇΪÁËÕÒµ½ÀàÎļþ,ÆäÖÐ.;ÊÇÖ¸¶¨µ±Ç°Ä¿Â¼)
Èç¹û²»Ö ......
×î³õÎÒÃÇÓà Java д JSP µÄʱºò£¬¼¸ºõ¿ÉÒÔ²»´¥¼°Òì³££¬ÒòΪ Servlet ÈÝÆ÷»á°Ñ API Å׳öµÄÒì³£°ü×°³É
ServletException ¶ª¸øÈÝÆ÷È¥´¦Àí¡£ÔÙºóÀ´Ó¦Ó÷ֲ㣬´úÂëÖÐÒª´¦ÀíµÄÒì³£±ã¶àÁË£¬Ò»°ã»áת»»³É×Ô¶¨ÒåµÄÒµÎñÒì³£À࣬ÓÃ
try-catch-throw
customerException-finally¡£ÔÙµ½Èç½ñ¸÷ÖÖ¿ò¼ÜÈÕÕé³ÉÊ죬´úÂëÖÐÏÔʽµÄÒì³£´¦ÀíÓÖ½¥½¥ÉÙÁËЩ£¬½èÖúÓÚ AOP
ºáÐУ¬Òì³£¶ÔÒµÎñµÄÓ°ÏìÃèÊö±»ÒÆÈëµ½ÁËÅäÖÃÎļþÖÐÁË£¬ÀýÈ磬ÊÂÎï´¦Àí¡¢È¨Ï޵ĿØÖƵȡ£
ÕâÆÄÓÐЩÏñÊÖ»úµÄ·¢Õ¹£¬µ±Í¨Ðż¼Êõ²»Éõ·¢´ïµÄʱºò£¬ÊÖÀï×¥µÄÊÇשͷ£¬ÐźÅÊÇÄ£ÄâµÄ¡£ºóÀ´ÂýÂýÊÝÉí³ÉÁ½Èý¸ùÊÖÖ¸´óС£¬ÉõÖÁÊǾÍÒ»Ö§±ÊËÆµÄ£¬¿ÉÈç½ñÐÅÏ¢Á¿´óÁË£¬ÆÁĻҪ´ó£¬ÔÙÅäÉÏ QWERT ¼üÅÌ£¬»úÉí×ÔÈ»¾Í·Ê˶ÁË¡£
µ±È»ÓëÊÖ»úµÄ¸öÍ·±äǨÂÔÓв»Í¬µÄÊÇ£¬ÈÎÆ¾ÄãÔõô¶Ô´ý Java ÖÐÒì³££¬ÇÐÈë AOP Ò²ºÃ£¬ÔÚ JVM Öд¦ÀíÒì³£µÄÄÚÔÚ»úÖÆÊ¼ÖÕδ±ä¡£
˵µ½ Java Òì³££¬ÎÞÍâºõ¾ÍÊÇ try¡¢catch¡¢finally¡¢throw¡¢throws Õâô¼¸¸ö¹Ø¼ü×Ö£¬ÕâЩ¸öµÄÓ÷¨ÊÇû±ØÒªÔÚÕâÀï½²ÁË¡£ÎÒÃÇÕâÀïÖ÷Òª¹Ø¼üһϠcatch ºÍ finally ÊÇÈçºÎÔÚ±àÒëºóµÄ class ×Ö½ÚÂëÖеġ£
Òì³£µÄÅ׳öÓë²¶»ñ£¬Catch ×Ó¾äµÄ±íÏÖ£¬À´¿´¿´Ò»¶Î Java ´úÂë¼°Éú³ÉµÄÏàÓ¦×Ö½ÚÂëÖ¸Áî¡£
package
&nbs ......
×°ÁËwin7ÒÔºóÖØÐÂÅäÖÃÁËjavaµÄ»·¾³±äÁ¿¡£
Ê×ÏÈ£¬JDKºÍJREµÄÇø±ð£ºjdk£¨java development toolkit£© jre£¨java run environment£©£¬Ç°Õß¾ÍÏñÊǸöjavaµÄ±àÒëÆ÷£¬ºóÕßÌṩһ¸öÔËÐл·¾³£¬javaÐéÄâ»ú°É¡£Ò»°ãÖ»ÓÃ×°jdk¾ÍÐÐÁË£¬ÀïÃæ×Ô¶¯»áÓиöjre¡£
ÎҵĹý³Ì£º
1. ÏȽâѹEclipse£¬ÔËÐÐÐèÒªÐéÄâ»ú
2. °²×°jre6£¬²»ÓÃÈκÎÅäÖã¬Eclipse³É¹¦Æô¶¯
3. µ«ÊÇjavaÃüÁîÔÚÃüÁîÐÐÏ¿ÉÒÔÓã¬javacÈ´²»ÄÜ
4. жjre£¬ÖØ×°jdk
5. ´ËʱEclipseÓÖÕÒ²»µ½ÐéÄâ»úÁË
ÏÂÃæÅäÖû·¾³±äÁ¿
1 ÔÚϵͳ±äÁ¿ÀïÌí¼ÓÒ»¸öеıäÁ¿ java_home="C:\Program file\java\jdk 1.6" ±íÃ÷ÄãµÄjdk°²×°Ä¿Â¼£¨Èç¹ûʹÓþø¶Ô·¾¶µÄ»°Õâ¸ö¿ÉÊ¡ÂÔ£©
2 ÔÚpath±äÁ¿ÖÐÌí¼Ó %java_home%\bin
3 ÔÚclasspathÖÐÌí¼Ó±äÁ¿ %java_home%\lib\tools.jar , %java_home%\lib\dt.jar
¸ã¶¨£¬ÃüÁîÐÐÖÐÔËÐÐ java -version£¬ java £¬ javacÃüÁîÈç¹û¶¼Õý³£¾Íok ......
JavaÊý¾Ý¿âÁ¬½Ó£¨JDBC£©ÓÉÒ»×éÓà Java ±à³ÌÓïÑÔ±àдµÄÀàºÍ½Ó¿Ú×é³É¡£JDBC Ϊ¹¤¾ß/Êý¾Ý¿â¿ª·¢ÈËÔ±ÌṩÁËÒ»¸ö±ê×¼µÄ API£¬Ê¹ËûÃÇÄܹ»Óô¿Java API À´±àдÊý¾Ý¿âÓ¦ÓóÌÐò¡£È»¶ø¸÷¸ö¿ª·¢É̵Ľӿڲ¢²»ÍêÈ«Ïàͬ£¬ËùÒÔ¿ª·¢»·¾³µÄ±ä»¯»á´øÀ´Ò»¶¨µÄÅäÖñ仯¡£±¾ÎÄÖ÷Òª¼¯ºÏÁ˲»Í¬Êý¾Ý¿âµÄÁ¬½Ó·½Ê½¡£
¡¡¡¡Ò»¡¢Á¬½Ó¸÷ÖÖÊý¾Ý¿â·½Ê½ËÙ²é±í
¡¡¡¡ÏÂÃæÂÞÁÐÁ˸÷ÖÖÊý¾Ý¿âʹÓÃJDBCÁ¬½ÓµÄ·½Ê½£¬¿ÉÒÔ×÷Ϊһ¸öÊÖ²áʹÓá£
¡¡¡¡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.getCo ......
1¡¢¼¯ºÏÆäʵ¿ÉÒÔ¿´³ÉΪÊý×éµÄÀ©Õ¹£¬ËüÓëÊý×éµÄ²»Í¬Ö®´¦ÔÚÓÚ:
¡¶1¡· Ò»¸öÊý×éÖ»ÔÊÐí´æ´¢Ò»ÖÖÀàÐ͵ÄÊý¾Ý£¬¶øÒ»¸ö¼¯ºÏ¿ÉÒÔ´æ´¢ÈÎÒ»ÖÖ¶ÔÏóÀàÐÍÊý¾Ý£»
¼òµ¥µÄ˵һ¸ö¼¯ºÏÀàËÆÒ»¸ö Object[] Êý×飬ÒòΪһÇÐÀàµÄ»ùÀ඼ΪObjectÀ࣬
ËùÒÔÒ»ÇÐÀà¶¼¿ÉÒÔÒþʽת»»ÎªObjectÀ࣬Ȼºó´æ´¢µ½ObjectÀàÐ͵ÄÊý×éÖС£
¡¶2¡·Êý×éµÄ´óСΪ¹Ì¶¨µÄ£¬¶ø¼¯ºÏµÄ´óСȴ¿ÉÒÔ¸ù¾ÝÊý¾ÝµÄ¶àÉÙÀ´×Ô¶¯Ôö¼Ó»ò¼õС£»
¡¶3¡·¿ÉÒÔͨ¹ý ·ºÐÍ <ÀàÐÍ> À´Ê¹¼¯ºÏת»»ÎªÀàËÆÊý×éµÄ¼¯ºÏ£¬È磺
List<String> list=new ArrayList<String>();
&nbs ......
ÖÚËùÖÜÖª£¬javaÖÐintÐͺÍcharÐÍÊý¾Ý²»ÏñcÓïÑÔÖÐÄÇÑù¿ÉÒÔÈÎÒâת»»£¬¼´²»¿ÉÒÔ½«Ò»¸öintÐͱäÁ¿×Ô¶¯×ª»»ÎªcharÐÍ£¬ÈçÏÂÃæ´úÂëÖеÄÑÝʾ:
public class TestSort{
public static void main(String args[]){
int x='a';//²»»á²úÉú±àÒë´íÎó£¬ÒòΪ'a'¸³¸øxÊÇÒþʽת»»
System.out.println(x);
char ch=x;//»á²úÉú±àÒë´íÎó£¬ÒòΪxÀàÐͱÈchÓÅÏȼ¶¸ß£¬±ØÐëÇ¿ÖÆÀàÐÍת»»£¬µ«ÊÇÔÚCÓïÑÔÖÐÕâÑùÊÇ¿ÉÒÔµÄ
System.out.println(ch);
}
}
µ«ÊÇ¿´ÏÂÃæµÄ´úÂë:
public class TestSort{
public static void main(String args[]){
int x='a';
System.out.println(x);
char ch=97;//²»»á²úÉú±àÒë´íÎó
System.out.println(ch);
}
}
ÉÏÃæ´úÂë²»»á²úÉúÈκαàÒë´íÎ󣬴˴¦µÄ97ËäÈ»ÔÚÊýѧÒâÒåÉÏÊÇÒ»¸öÕûÊý(×¢ÒâÕûÊýºÍÕûÐ͵ÄÇø±ð)£¬µ«ÊÇjavaÓïÑÔÖÐËü±»×÷Ϊ³£ÊýÀ´¶Ô´ý£¬Ò²¾ÍÊÇ˵һ¸öֵΪ97µÄintÐͱäÁ¿ºÍ97±¾ÉíÊDz»Í¬µÄ¸ÅÄ97ÔÚûÓкÍij¸öÀàÐ͹ØÁªÒÔǰ¸³¸øchÊÇÍêȫûÓдíÎóµÄ¡£ÆäʵÎÒÃÇÓÃchar ch='a'¸øch¸³ÖµµÄʱºò£¬'a'ÔÚÄÚ´æÖеĴ洢ֵ¾ÍÊÇ97¡£ ......