Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaÊ±Çøbug£¬TimeZone.setDefault()Ö»ÔÚµ±Ç°Ïß³ÌÓÐЧ

   ÏîÄ¿ÊÇ»ùÓÚGMTʱ¼äµÄ£¬ÔÚϵͳÆô¶¯µÄʱºò£¬ÎÒÃǾͻáµ÷ÓÃTimeZone.setDefault(timeZone)½«Ä¬ÈÏÊ±ÇøÉèΪGMT¡£
   ºóÀ´Í»È»·¢ÏÖ£¬ÓÐʱÓû§Ñ¡ÔñµÄʱ¼ä¾­¹ýºǫ́һȦºó»Ø²úÉú8¸öСʱÎó²î¡£ÓÖÊǼäЪÐԵģ¬ÒªËûÖØÏÖµÄʱºòÓÖÆ«²»À´¡£¿àÐÄdebug£¬ÖÕÓÚ·¢ÏÖÔÚ²¿·ÖÏß³ÌÖУ¬Ê±Çø»¹ÊÇGMT+8£¬ºǫ́ij¸öµ÷ÓÿÉÄܰÑÊ±Çø±äΪÁËGMT£¬8СʱÎó²î¾Í²úÉúÁË¡£ÍøÉÏÒ»ËÑ£¬Ô­À´ÊÇbug£º
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6352812
Ö»ÔÚ²¿·ÖµçÄÔÉÏÓÐÎÊÌ⣬ÐÒºÃproductionÉÏÊǺõģ¬Ð´ÁËÒ»¸ö³ÌÐòÀ´²âÊÔ£º
import java.util.Date;
import java.util.TimeZone;
public class Test {
  @SuppressWarnings("unused")
  public static void main(String[] args) throws InterruptedException {
    DateThread thread = new DateThread();
    thread.start();
    TimeZone gmt = TimeZone.getTimeZone("GMT");
   
    Date now = new Date();
    System.out.println("main thread,before set timezone:" + now.toString());
    TimeZone.setDefault(gmt);
    Thread.currentThread().sleep(2000);
    thread.resume();
    System.out.println("main thread,after set timezone:" + now.toString());
   
  }
}
class DateThread extends Thread {
  @SuppressWarnings( { "unused", "deprecation" })
  public void run() {
    Date now = new Date();
    System.out.println("sub thread,before set timezone:" + now.toString());
    this.suspend();
    System.out.println("sub thread,after set timezone:" + now.toString());
  }
}
Èç¹û×ÓÏß³ÌÊä³öµÄÊ±ÇøÒ»Ñù£¬¾Í˵Ã÷ÓÐbug


Ïà¹ØÎĵµ£º

ÔÚJAVAÎļþÖлñÈ¡¸ÃÏîÄ¿µÄÏà¶Ô·¾¶

ÔÚJAVAÎļþÖлñÈ¡¸ÃÏîÄ¿µÄÏà¶Ô·¾¶
1.»ù±¾¸ÅÄîµÄÀí½â
¡¡¡¡¾ø¶Ô·¾¶£º¾ø¶Ô·¾¶¾ÍÊÇÄãµÄÖ÷Ò³ÉϵÄÎļþ»òĿ¼ÔÚÓ²ÅÌÉÏÕæÕýµÄ·¾¶£¬(URLºÍÎïÀí·¾¶)ÀýÈ磺
C:\xyz\test.txt ´ú±íÁËtest.txtÎļþµÄ¾ø¶Ô·¾¶¡£http://www.sun.com/index.htmÒ²´ú±íÁËÒ»¸ö
URL¾ø¶Ô·¾¶¡£
¡¡¡¡Ïà¶Ô·¾¶£ºÏà¶ÔÓëij¸ö»ù׼Ŀ¼µÄ·¾¶¡£°üº¬WebµÄ ......

JAVA¿ò¼Ü


Struts¡¢HibernateºÍSpringµÄÇáÐÍJ2EE¼Ü¹¹µÄÑо¿ 
 
  
¹Ø¼ü´Ê Struts£¬Hibernate£¬Spring£¬Óû§¹ÜÀí
Ò»¡¢ÌØÐÔ
1. StrutsÓëMVC
StrutsÊÇApache JakartaÏîÄ¿µÄ×é³É²¿·Ö¡£¸ÃÏîÄ¿µÄÄ¿±êÊÇΪ½¨Á¢Java Web Ó¦ÓóÌÐò¶øÌṩµÄÒ»¸ö¿ªÔ´
¿ò¼Ü¡£Í¨¹ýʹÓÃStruts¿ò¼Ü¿ÉÒԸĽøºÍÌá¸ßJava Server Pages (JSP ......

×îÖØÒªµÄ Java EE ×î¼Ñʵ¼ù 1. ʼÖÕʹÓà MVC ¿ò¼Ü


 
1. ʼÖÕʹÓà MVC ¿ò¼Ü¡£
½«ÒµÎñÂß¼­£¨Java Bean ºÍ EJB ×é¼þ£©´Ó¿ØÖÆÆ÷Âß¼­£¨Servlet/Struts ²Ù×÷£©ºÍ±íʾÂß¼­£¨JSP¡¢XML/XSLT£©ÖÐÇåÎúµØ·ÖÀë³öÀ´¡£Á¼ºÃµÄ·Ö²ã¿ÉÒÔ´øÀ´Ðí¶àºÃ´¦¡£
×¢:¶ÔÓÚһЩСÐ͵ĻòÕßÒµÎñÏà¶Ô¼òµ¥µÄϵͳ¶øÑÔ,Óÿò¼Ü¿ª·¢²¢²»ÄÜ´øÀ´ÈκÎÐ§Òæ,²¢ÇÒÎÒÉîÐÅÔÚһЩÏîÄ¿¿ª·¢ÖÐ,ÌØ±ðÊǽö½öÓÉij¸öÈ˶ÀÁ ......

Java°²È«±à³Ì±Ê¼Ç¡¾1¡¿ »ù±¾¹¤¾ß¼ò½é¡£


1.1 J2SE
µÄÖ÷Òª¹¤¾ß
»ù±¾¹¤¾ß£º
javac
  
Java
±à³ÌÓïÑԵıàÒëÆ÷¡£±¾Êé¸÷ÕµijÌÐò¶¼ÊÇÔÚ
DOS
´°¿ÚÖÐͨ¹ýÖ´ÐÐ
"javac
ÎļþÃû

À´±àÒë
Java
³ÌÐòµÄ¡£ÎļþÃû±ØÐëÒÔ
.java
Ϊºó׺£¬±àÒëÒÔºóÉú³É
.class
Ϊºó׺µÄ×Ö½ÚÂëÎļþ¡£
java
ÓÃÓÚÖ´ÐÐ
Java
Ó¦ÓóÌÐò¡£±¾Êé¸÷ÕÂµÄ³Ì ......

java ±àдº¯Êý ½»»»Á½¸ö»ù±¾±äÁ¿µÄÖµ

Java±àдһ¸öº¯Êý½»»»Á½¸ö±äÁ¿µÄÖµ
Javaº¯ÊýÔÚ´«µÝ¹ý³ÌÖÐÖ»Äܹ»´«Öµ£¬²»ÄÜ´«Ö·¡£ÕâÑù£¬º¯ÊýµÄ²ÎÊýÔÚº¯ÊýÄÚ²¿×öÈκα仯¾Í¶¼²»»á·´Ó³µ½Íⲿµ÷ÓÃÕßÀ´¡£ËùÒÔ½â¾öÖ®µÀ¾ÍÊÇÒªÕÒµ½Òª½»»»¶ÔÏóµÄÒýÓ᣶ÔÓÚÆÕͨµÄÖµÀàÐÍ£¬Ïñint»òÕßdoubleÕâÑùµÄ¿ÉÒԸĴ«ËûÃǵİü×°ÀàIntegerºÍDouble¡£¶ø¶ÔÓÚ±¾À´¾ÍÊÇÒýÓÃÀàÐ͵ĶÔÏó£¬ÔòÐèÒª¶ÔËûÃÇÔÙ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ