java synchronized - Java / Java SE
Java code: ...... synchronized(user){ int loginNum = Integer.parseInt(Main_Client_Dia.jtf2.getText().trim()); Main_Client_Dia.jtf2.setText(""); loginNum++; Main_Client_Dia.jtf2.setText(loginNum+""); } ...... ¼¸°Ù¸öÏß³Ìͬʱ·ÃÎÊÉÏÃæµÄ´úÂë Ϊʲô ÎÞ·¨ ʵÏÖͬ²½ÄØ Main_Client_Dia.jtf2.setTextµÄֵʱÓÐʱ»á²»ÊÇÏëÒªµÄ½á¹û£¬
ûÌåÑé¹ýÉÏ°Ù¸öÏ̷߳ÃÎÊ£¡£¡ ÎÒ¾õµÃÓ¦¸ÃÊǶÔÏóuser²»ÄÜʵÏÖ£¡£¡ Äã°ÑÀ¨ºÅºÍÀïÃæµÄuserÈ¥µôÊÔÊÔ Ê×ÏÈÄãҪȷ¶¨Äãÿһ¸öÏß³ÌÖеÄuserÊÇͬһ¸ö¶ÔÏó.Èç¹û²»ÊÇͬһ¸ö¶ÔÏóÒ²¾ÍûÓÐÒâÒåÁË! ¶¥ÒýÓà Ê×ÏÈÄãҪȷ¶¨Äãÿһ¸öÏß³ÌÖеÄuserÊÇͬһ¸ö¶ÔÏó.Èç¹û²»ÊÇͬһ¸ö¶ÔÏóÒ²¾ÍûÓÐÒâÒåÁË!ÒýÓà Ê×ÏÈÄãҪȷ¶¨Äãÿһ¸öÏß³ÌÖеÄuserÊÇͬһ¸ö¶ÔÏó.Èç¹û²»ÊÇͬһ¸ö¶ÔÏóÒ²¾ÍûÓÐÒâÒåÁË! ÿ¸öuser¶ÔÏóÊÇͨ¹ý¹¹Ô캯Êý´«½øÀ´µÄ£¬Ã¿¸öÏ̵߳Äuser¶ÔÏóÊDz»Í¬µÄ ¶øÇÒ£¬ int loginNum = Integer.parseInt(Main_Client_Dia.jtf2.getText().trim()); ¾³£³ö´í£¬Ìáʾ˵Main_Client_Dia.jtf2.getText().trim()µÃµ½µÄֵΪ"";ÒýÓà ÒýÓà 3 Â¥ xiao_kan_hong_chen µÄ»Ø¸´: Ê×ÏÈÄãҪȷ¶¨Äãÿһ¸öÏß³ÌÖеÄuserÊÇͬһ¸ö¶ÔÏó.Èç¹û²»ÊÇͬһ¸ö¶ÔÏóÒ²¾ÍûÓÐÒâÒåÁË! ÿ¸öuser¶ÔÏóÊÇͨ¹ý¹¹Ô캯Êý´«½øÀ´µÄ£¬Ã¿¸öÏ̵߳Äuser¶ÔÏóÊDz»Í¬µÄ
Ïà¹ØÎÊ´ð£º
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 52 in the jsp file: /vip_info.jsp ÕË cannot be resolved 49: <table border="1& ......
java swing ³ÌÐòÈçºÎ´ò°ü³Éjar£¬È»ºó¿ÉÒÔͨ¹ýÅú´¦ÀíÎļþbatÖ±½ÓÔËÐУ¬ÓÐûÓÐʲô¹¤¾ßÖ±½Ó¿ÉÒÔÍê³ÉÕâÁ½¸ö¹¤×÷£¿ ÓÃjar´ò°ü£¬°ÑÔËÐÐÐèÒªµÄjar¿½±´µ½Ò»¸öĿ¼£¬Åú´¦ÀíÓà start javaw -cp .;ÆäËû°ü·¾¶ ÔËÐÐ ÓÃzip ......
ÔھƵê¹ÜÀíϵͳÖÐ,ÓÐÒ»¸ö¶ÔÄÚµÄϵͳ,¹©Ç°Ì¨·þÎñÔ±ºÍ¾ÀíʹÓà »¹ÓÐÒ»¸ö¾ÍÊǶÔÍâ,Èÿͻ§¿ÉÒÔÔÚÍøÉÏÔ¤¶©·¿¼ä, ËüÃÇÖ®¼äÊÇÔõôͨѶµÄ.?µ±ÎÒÌá½»Ô¤¶©·¿¼äÐÅÏ¢µÄʱºò, ÔÚ¶ÔÄÚµÄϵͳÖÐ,ÈçºÎÖªµÀÎÒÒѾÌá½»ÁËÐÅÏ¢¹ýÈ¥.Ê¹Ç ......
ÔõôÑù½«id´«¹ýÈ¥°¡£¿£¿£¿ÊǼòµ¥µÄ´«¡£¡£¡£ÔÚµØÖ·À¸ÖÐдidºÅ LZ ºÃÓÄĬ£¡²»ÖªµÀÄãµÄÒâ˼£¿ ÊÇÏë°ÑID ´«µ½ACTION ? ͨ¹ýURl id=? ²»¹»Ïêϸ ±ðÈ˲»ÖªµÀÔõÑù°ïÄã ../XXXXX.do?id=XXXX&id2=XXXXX
......
id name datetime 1 a 2010-05-13 10:15:00 2 b 2010-05-14 09:10:00 3 d 2010-05-14 10:10:00 ÈçºÎ½«¾àÀëÄ¿Ç°×î½üµÄÄǸö¼Ç¼µÄname ¸üÐÂΪ¡°x¡±ÄØ Ð»Ð»¿© °¡ ºÇºÇ update table_n ......