java web/tomcatÏîÄ¿ÖÐDateÀà»ñȡʱ¼ä²»ÕýÈ·µÄÎÊÌâ
ÕâÁ½Ìì×öÒ»¸öwebÏîÄ¿,Êý¾Ý¿âÖÐÓиö×Ö¶ÎΪÉϴεǼµÄʱ¼ä,ËùÒÔÐèÒªÔÚÓû§µÇ¼µÄʱºò¼Ç¼ÏÂʱ¼ä ûÓÃcalendar ÓÃÁËDateÀà,ͻȻ·¢ÏÖsystem.out.println(date)µÄʱºòʱ¼ä±È±±¾©Ê±¼äÍíÁË8¸öСʱ£¨»¹ÊÇÔçÁË,·´ÕýÊDzî8¸öСʱ£© ×Ðϸһ¿´ÏµÍ³Ê±¼ä ÍêÈ«ÕýÈ·,µ±Ê±ÒÔΪÊÇjdk sbÁËÏ µ÷ÊÔÁË°ëÌì·¢ÏÖÔõô¶¼²»¶Ô
¶øн¨Ò»¸öjava project ,system.out.println(date)µÄ½á¹ûÈ´ÍêÈ«ÕýÈ·
ºóÀ´²ÅÖªµÀÊÇtomcat·þÎñÆ÷ ĬÈÏʱÇøÎÊÌâ
½â¾ö·½·¨´óÌåÓÐ2ÖÖ
-¡·Date date=new Date();
DateFormat formatter=DateFormat.getDateTimeInstance(); //µÃµ½Ò»¸öÖ¸¶¨Ê±Çø(ÖйúÊǶ«8ÇøµÄ)µÄDateFormat ¶ÔÏó
TimeZone timezone=TimeZone.getTimeZone( "GMT+08:00 "); //ʵÀý»¯Ê±Çø¶ÔÏó
formatter.setTimeZone(timezone);
System.out.println(formatter.format(date)); //Êä³ö¸ñʽ»¯ºóµÄʱ¼ä
-¡·ÐÞ¸ÄtomcatÎļþϵÄbin/catalina Îļþ ÓüÇʱ¾´ò¿ª
ÕÒµ½set JAVA_OPTS=
¸Ä³É set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx800m -Duser.timezone=GMT+08
Ïà¹ØÎĵµ£º
ListµÄÓ÷¨
List°üÀ¨List½Ó¿ÚÒÔ¼°List½Ó¿ÚµÄËùÓÐʵÏÖÀà¡£ÒòΪList½Ó¿ÚʵÏÖÁËCollection½Ó¿Ú£¬ËùÒÔList½Ó¿ÚÓµÓÐCollection½Ó¿ÚÌṩµÄËùÓг£Ó÷½·¨£¬ÓÖÒòΪListÊÇÁбíÀàÐÍ£¬ËùÒÔList½Ó¿Ú»¹ÌṩÁËһЩÊʺÏÓÚ×ÔÉíµÄ³£Ó÷½·¨£¬Èç±í1Ëùʾ¡£
±í1 List½Ó¿Ú¶¨ÒåµÄ³£Ó÷½·¨¼°¹¦ÄÜ
´Ó±í1¿ÉÒÔ¿´³ö£¬List½Ó¿ÚÌṩµÄÊʺÏÓÚ×ÔÉíµÄ ......
Java Swing¶àÏß³ÌËÀËøÎÊÌâ½âÎö
ÔÚ»ùÓÚJava Swing½øÐÐͼÐνçÃ濪·¢µÄʱºò£¬¾³£Óöµ½µÄ¾ÍÊÇSwing¶àÏß³ÌÎÊÌâ¡£ÎÒÃÇ¿ÉÒÔÏëÏëһϣ¬Èç¹ûÐèÒªÔÚÒ»¸öͼÐνçÃæÉÏÏÔʾºÜ¶àÊý¾Ý£¬ÕâЩÊý¾ÝÊǾ¹ý³¤Ê±¼ä¡¢¸´ÔӵIJéѯºÍÔËËãµÃµ½µÄ¡£Èç¹ûÔÚͼÐνçÃæµÄͬһ¸öÏß³ÌÖнøÐвéѯºÍÔËË㹤×÷Ôò»áµ¼ÖÂÒ»¶Îʱ¼ä½çÃæ´¦ÓÚËÀ»ú״̬£¬Õâ»á¸øÓû ......
Java5ÖÐÌṩÁËеÄ×¢ÊÍ£¨Annotation£©£¬Äܹ»ÎªÀàÌṩ¶îÍâÐÅÏ¢£¬±¾ÎĽéÉÜÁËÈçºÎ¶¨Òå×¢ÊÍ¡¢ÈçºÎʹÓÃ×¢ÊͺÍÈçºÎ½âÎö×¢ÊÍ¡£
1¡¢¶¨Òå×¢ÊÍ
package ch5;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Ta ......
public class Demo
{
static int i=1;
static
{
i++;
}
public Demo()
{
......