ºìÁªLinuxÃÅ»§
Linux°ïÖú

Ï̻߳ù´¡£¨µÚ¶þ²¿·Ö£©JavaÏ̵߳ÄȱÏݺ͸±×÷Óü¸½â¾ö°ì·¨

·¢²¼Ê±¼ä:2006-05-03 19:33:10À´Ô´:ºìÁª×÷Õß:ÌìɽÀÏͯ
Al Saganich / ·­Ò룺ÖìÓ¢

<--ÔÚÏ̻߳ù´¡µÄµÚ¶þ²¿·ÖÖУ¬ÎÒÃǽ«Á˽âÒ»ÏÂʹÓÃJavaÏ̵߳ÄȱÏݺ͸±×÷Óã¬ÒÔ¼°ÔÚSUN JDK 1.2ÖÐÊÇÈçºÎÐÞ¸ÄÏ̵߳ÄÔËÐлúÖƵÄ-->

ÔÚÉÏƪÎÄÕ¡¶Java 101Ö®Ï̻߳ù´¡¡·ÖУ¬ÎÒÃǽéÉÜÁËÏ̵߳ĸÅÄîÒÔ¼°ÈçºÎʹÓÃÏ̡߳£Õâ¸öÔ£¬ÎÒÃǽ«×ªµ½¸ü¸ß¼¶µÄ»°Ì⣬°üÀ¨Ï̵߳ÄȱÏݼ°¸±×÷Óã¬ÒÔ¼°ÔÚSUN JDK 1.2ÖУ¬ÊÇÈçºÎ¸Ä½øÏ̵߳ÄÔËÐлúÖƵġ£

synchronize£¨Í¬²½£©
ÈÃÎÒÃÇ»ØÒäÒ»ÏÂÉÏƪÎÄÕÂÖн²µÄ£ºÏß³ÌÔÊÐíÁ½¸ö»òÕ߸ü¶à¸ö½ø³ÌͬʱִÐС£Êµ¼ÊÉÏ£¬ÕâЩÏß³ÌÒ²¿ÉÒÔ¹²Ïí¶ÔÏóºÍÊý¾Ý£¬ÔÚÕâÖÖÇéÐÎÏ£¬ÄãÒªÖªµÀ²»Í¬µÄÏß³ÌÔÚͬһʱ¼äÄÚ²»ÄÜ´æȡͬһÊý¾Ý£¬ÒòΪһ¿ªÊ¼Éè¼ÆJavaµÄʱºò£¬¾Í²ÉÓÃÁËÏ̵߳ĸÅÄJavaÓïÑÔ¶¨ÒåÁËÒ»¸öÌØÊâµÄ¹Ø¼ü×Ösynchronize£¨Í¬²½£©£¬¸Ã¹Ø¼ü×Ö¿ÉÒÔÓ¦Óõ½´úÂë¿éÉÏ£¬´úÂë¿éÒ²°üÀ¨Èë¿Ú·½·¨£¬¸Ã¹Ø¼ü×ÖµÄÄ¿µÄÊÇ·ÀÖ¹¶à¸öÏß³ÌÔÚͬһʱ¼äÖ´ÐÐͬһ´úÂë¿éÄڵĴúÂë¡£

¶¨ÒåÒ»¸öͬ²½µÄ·½·¨£¬¸ñʽÈçÏ£º

[public|private] synchronized {type}
methodname(...)
Ò»¸ö°Ñͬ²½Õâ¸ö¹Ø¼ü×ÖÓ¦Óõ½·½·¨Öеļòµ¥µÄÀý×Ó£º

public class someClass {
public void aMethod() {
// Some code
synchronized(this) {
// Synchronized code block
}
// more code.
}
}
ͬ²½»¯µÄ¹Ø¼ü×Ö¿ÉÒÔ±£Ö¤ÔÚͬһʱ¼äÄÚÖ»ÓÐÒ»¸öÏ߳̿ÉÒÔÖ´ÐиôúÂë¶Î£¬¶øÈκÎÆäËûÒªÓõ½¸Ã¶Î´úÂëµÄÏ߳̽«±»×èÈû£¬Ö±µ½µÚÒ»¸öÏß³ÌÖ´ÐÐÍê¸Ã¶Î´úÂë¡£

ËÀËøºÍ¼¢¶ö
¶ÔÓÚ¼¢¶öµÄ¶¨Òå-ÓÉÓÚ±ðµÄ²¢·¢µÄ¼¤»îµÄ¹ý³Ì³Ö¾ÃÕ¼ÓÐËùÐè×ÊÔ´£¬ÊÇĪ¸öÒì²½¹ý³ÌÔØ¿ÍÔ¤²âµÄʱ¼äÄÚ²»Äܱ»¼¤»î¡£

×î³£Óöµ½µÄÏ̵߳ÄÁ½¸öȱÏÝÊÇËÀËøºÍ¼¢¶ö¡£µ±Ò»¸ö»òÕ߶à¸ö½ø³Ì£¬ÔÚÒ»¸ö¸ø¶¨µÄÈÎÎñÖУ¬Ð­Í¬×÷Ó㬻¥Ïà¸ÉÉ棬¶øµ¼ÖÂÒ»¸ö»òÕ߸ü¶à½ø³ÌÓÀÔ¶µÈ´ýÏÂÈ¥£¬ËÀËø¾Í·¢ÉúÁË¡£Óë´ËÀàËÆ£¬Ëüµ±Ò»¸ö½ø³ÌÓÀ¾ÃÐÔµØÕ¼ÓÐ×ÊÔ´£¬Ê¹µÃÆäËû½ø³ÌµÃ²»µ½¸Ã×ÊÔ´£¬¾Í·¢ÉúÁ˼¢¶ö¡£

Ê×ÏÈÎÒÃÇ¿´Ò»ÏÂËÀËøÎÊÌâ¡£¿¼ÂÇÒ»¸ö¼òµ¥µÄÀý×Ó£¬¼ÙÈçÄãµ½ATM»úÉÏÈ¡Ç®£¬µ«ÊÇÄãÈ´¿´µ½ÈçϵÄÐÅÏ¢¡°ÏÖÔÚÓÐûÓÐÏÖ½ð£¬ÇëµÈ»á¶ùÔÙÊÔ¡£¡±ÄãÐèҪǮ£¬ËùÒÔÄã¾ÍµÈÁËÒ»»á¶ùÔÙÊÔ£¬µ«ÊÇÄãÓÖ¿´µ½Í¬ÑùµÄÐÅÏ¢¡£Óë´Ëͬʱ£¬ÔÚÄãºóÃ棬һÁ¾ÔË¿î×°¼×³µÕýµÈ´ý×Å°ÑÇ®·Å½øATMÖУ¬µ«ÊÇÔË¿î×°¼×³µµ½²»ÁËATMÈ¡¿î»ú£¬ÒòΪÄãµÄÆû³µµ²×ŵÀ¡£¶øÄãÓÖҪȡµ½Ç®£¬²Å»áÀ뿪ԭµØ¡£ÕâÖÖÇé¿öÏ£¬¾Í·¢ÉúÁËËÀËø¡£

ÔÚ¼¢¶öµÄÇéÐÎÏ£¬ÏµÍ³²»´¦ÓÚËÀËø״̬ÖУ¬ÒòΪÓÐÒ»¸ö½ø³ÌÈÔÔÚ´¦ÀíÖ®ÖУ¬Ö»ÊÇÆäËû½ø³ÌÓÀÔ¶µÃ²»µ½Ö´ÐеĻú»á¡£ÔÚʲôÑùµÄ»·¾³Ï£¬»áµ¼Ö¼¢¶öµÄ·¢Éú£¬Ã»ÓÐÔ¤ÏÈÈ·¶¨ºÃµÄ¹æÔò¡£¶øÒ»µ©·¢ÉúÏÂÃæËÄÖÖÇé¿öÖ®Ò»£¬¾Í»áµ¼ÖÂËÀËøµÄ·¢Éú¡£

Ï໥Åųâ: Ò»¸öÏ̻߳òÕß½ø³ÌÓÀÔ¶Õ¼ÓÐÒ»¹²Ïí×ÊÔ´£¬ÀýÈ磬¶ÀÕ¼¸Ã×ÊÔ´¡£
Ñ­»·µÈ´ý: ½ø³ÌAµÈ´ý½ø³ÌB£¬¶øºóÕßÓÖÔڵȴý½ø³ÌC£¬¶ø½ø³ÌCÓÖÔڵȴý½ø³ÌA¡£
²¿·Ö·ÖÅä: ×ÊÔ´±»²¿·Ö·ÖÅä¡£ÀýÈ磬½ø³ÌAºÍB¶¼ÐèÒªÓ÷ÃÎÊÒ»¸öÎļþ£¬²¢ÇÒ¶¼ÒªÓõ½´òÓ¡»ú£¬½ø³ÌA»ñµÃÁËÎļþ×ÊÔ´£¬½ø³ÌB»ñµÃÁË´òÓ¡»ú×ÊÔ´£¬µ«ÊÇÁ½¸ö½ø³Ì²»ÄÜ»ñµÃÈ«²¿µÄ×ÊÔ´¡£
ȱÉÙÓÅÏÈȨ: Ò»¸ö½ø³Ì·ÃÎÊÁËij¸ö×ÊÔ´£¬µ«ÊÇÒ»Ö±²»ÊͷŸÃ×ÊÔ´£¬¼´Ê¹¸Ã½ø³Ì´¦ÓÚ×èÈû״̬¡£
Èç¹ûÉÏÃæËÄÖÖÇéÐζ¼²»³öÏÖ£¬ÏµÍ³¾Í²»»á·¢ÉúËÀËø¡£ÇëÔÙ¿´Ò»Ï¸ղŵÄÎļþ/´òÓ¡»úµÄÀý×Ó£¬µ±ÆäÖÐÒ»¸ö½ø³ÌÅжϳöËüµÃ²»µ½ËüËùÐèÒªµÄµÚ¶þ¸ö×ÊÔ´£¬¾ÍÊÍ·ÅÒѾ­µÃµ½µÄµÚÒ»¸ö×ÊÔ´£¬ÄÇôµÚ¶þ¸ö½Ì³Ì¿ÉÒÔ»ñµÃÁ½¸ö×ÊÔ´£¬²¢Äܹ»ÔËÐÐÏÂÈ¥¡£

Ï̵߳ĸ߼¶Ó÷¨
µ½Ä¿Ç°ÎªÖ¹£¬ÎÒÃÇÒѾ­Ì¸µ½´´½¨ºÍ¹ÜÀíÏ̵߳Ļù±¾ÖªÊ¶¡£ÄãÐèÒª×öµÄ¾ÍÊÇÆô¶¯Ò»¸öỊ̈߳¬²¢ÈÃËüÔËÐС£ÄãµÄÓ¦ÓóÌÐòÒ²ÐíÏ£ÍûµÈ´ýÒ»¸öÏß³ÌÖ´ÐÐÍê±Ï£¬Ò²Ðí´òËã·¢ËÍÒ»¸öÐÅÏ¢¸øỊ̈߳¬»òÕßÖ»´òËãÈÃÏß³ÌÔÚ´¦Àí֮ǰÐÝÃßÒ»»á¶ù¡£Ïß³ÌÀàÌṩÁËËÄÖÖ¶ÔÏ߳̽øÐвÙ×÷µÄAPIµ÷Óá£

Join

Èç¹ûÒ»¸öÓ¦ÓóÌÐòÐèÒªÖ´Ðкܶàʱ¼ä£¬±ÈÈçÒ»¸öºÄʱºÜ³¤µÄ¼ÆË㹤×÷£¬Äã¿ÉÒ԰ѸüÆË㹤×÷Éè¼Æ³ÉÏ̡߳£µ«ÊÇ£¬¼Ù¶¨»¹ÓÐÁíÍâÒ»¸öÏß³ÌÐèÒª¼ÆËã½á¹û£¬µ±¼ÆËã½á¹û³öÀ´ºó£¬ÈçºÎÈÃÄǸöÏß³ÌÖªµÀ¼ÆËã½á¹ûÄØ£¿½â¾ö¸ÃÎÊÌâµÄÒ»¸ö·½·¨ÊÇÈõڶþ¸öÏß³ÌÒ»Ö±²»Í£µØ¼ì²éһЩ±äÁ¿µÄ״̬£¬Ö±µ½ÕâЩ±äÁ¿µÄ״̬·¢Éú¸Ä±ä¡£ÕâÑùµÄ·½Ê½ÔÚUNIX·ç¸ñµÄ·þÎñÆ÷Öг£³£Óõ½¡£JavaÌṩÁËÒ»¸ö¸ü¼Ó¼òµ¥µÄ»úÖÆ£¬¼´Ïß³ÌÀàÖеÄjoin ·½·¨¡£

join ·½·¨Ê¹µÃÒ»¸öÏ̵߳ȴýÁíÍâÒ»¸öÏ̵߳ĽáÊø¡£ÀýÈ磬һ¸öGUI (»òÕßÆäËûÏß³Ì)ʹÓÃjoin·½·¨µÈ´ýÒ»¸ö×ÓÏß³ÌÖ´ÐÐÍê±Ï£º

CompleteCalcThread t = new
CompleteCalcThread();
t.start();
//
// ×öÒ»»á¶ùÆäËûµÄÊÂÇé
// È»ºóµÈ´ý
t.join();
// ʹÓüÆËã½á¹û...
Äã¿ÉÒÔ¿´µ½£¬ÓöÔ×ÓÏß³ÌʹÓÃjoin·½·¨£¬µÈ´ý×ÓÏß³ÌÖ´ÐÐÍê±Ï¡£ Join ÓÐÈýÖÖ¸ñʽ£º

void join(): µÈ´ýÏß³ÌÖ´ÐÐÍê±Ï¡£
void join(long timeout): ×î¶àµÈ´ýij¶Îʱ¼äÈÃÏß³ÌÍê³É¡£
void join(long milliseconds£¬ int nanoseconds): ×î¶àµÈ´ýij¶Îʱ¼ä£¨ºÁÃ룫ÄÉÃ룩£¬ÈÃÏß³ÌÍê³É¡£
Ïß³ÌAPI isAliveͬjoinÏà¹ØÁªÊ±£¬ÊǺÜÓÐÓõġ£Ò»¸öÏß³ÌÔÚstart(´Ëʱrun·½·¨ÒѾ­Æô¶¯)Ö®ºó£¬ÔÚstop֮ǰµÄijʱ¿Ì´¦ÓÚisAlive ״̬¡£

¶ÔÓÚ±àдÏ̵߳ijÌÐòÔ±À´Ëµ£¬»¹ÓÐÆäËûÁ½¸öÓÐÓõÄÏß³ÌAPI£¬¼´waitºÍ notify¡£Ê¹ÓÃÕâÁ½¸öAPI£¬ÎÒÃÇ¿ÉÒÔ¾«È·µØ¿ØÖÆÏ̵߳ÄÖ´Ðйý³Ì¡£¿¼ÂÇÒ»¸ö¼òµ¥µÄÀý×Ó£¬ÓиöÉú²úÕßÏ̺߳ÍÏû·ÑÕßỊ̈߳¬ÎªÁËÈÃÓ¦ÓóÌÐò¸üÓÐЧÂÊ£¬ËùÒÔÎÒÃDz»´òËã²ÉÓòéѯµÈ´ýµÄ·½·¨¡£µ±Ïû·ÑÕß¿ÉÒÔÏû·Ñ¶ÔÏóʱ£¬Ïû·ÑÕßÐèÒªµÃÖª¸ÃÐÅÏ¢¡£

ÎÒÃÇ¿ÉÒ԰ѸÃÀý×Ó²ûÊöÈçÏ£ºÉú²úÕßÏ̲߳»¶ÏµØÔÚÔËÐÐ×Å£¬°ÑÏîÄ¿·ÅÈëÁбíÖУ¬¸ÃÁбíµÄadd·½·¨ÓÉsynchronize ¹Ø¼ü×Ö±£»¤×Å£¬µ±Ò»¸ö¶ÔÏóÌí¼Óµ½ÁбíÖУ¬Éú²úÕ߾ͿÉÒÔ֪ͨÏû·ÑÕߣºËüÒѾ­Ìí¼ÓÒ»¸ö¶ÔÏó£¬Ïû·ÑÕß¿ÉÒÔÏû·Ñ¸Ã¶ÔÏóÁË¡£Ã¿¸ö¶ÔÏóµÄrun·½·¨µÄα´úÂëÇë¼û±íA¡£

±íA: ÑÝʾ¸ß¼¶Ï̷߳½·¨µÄα´úÂë

class ProdCons {
class List {
public synchronized boolean add(Object o)
{...}
public synchronized boleanremove (Object o)
{...}
}
List data = new List();
ProdThread producer = null;
ConsThread consumer = null;
ProdCons() {
producer = new ProdThread(this);
consumer = new ConsThread(this);
producer.start();
consumer.start();
}
}
Ïû·ÑÕߺÍÉú²úÕßµÄÀ࣬Çë¼û±íBºÍ±íC¡£

±íB: Class ConsThread

class ConsThread extends Thread {
ProdCons parent;
ConsThread(ProdCons parent) {
this.parent = parent;
}
public synchronized void canConsume() {
notify();
}
public void run() {
boolean consumed;
do {
synchronized(this) {
try { wait();}
catch (Exception e) { ; }
}
do {
String str = (String)parent.list.remove();
if ( null == str) {
consumed = false;
break;
}
consumed = true;
System.out.println("Consumer
=>consumed " + str);
}
while ( true );
}
while (consumed);
}
}
±íC: Class ProdThread

class ProdThread extends Thread {
ProdCons parent;
ProdThread(ProdCons parent) {
this.parent = parent;
}
public void run() {
for ( int i = 0; i < 10; i++) {
String str = new String("ImAString" + i);
System.out.println("Producer produced " + str);
parent.list.add(str);
parent.consumer.canConsume();
}
parent.consumer.canConsume();
}
}
×¢Ò⣺notifyºÍwaitÁ½¸öAPI¶¼±ØÐëλÓÚͬ²½»¯£¨synchronized£©µÄ·½·¨ÖлòÕß´úÂë¿éÖУ¡

Ï̺߳ÍSun JDK 1.2
Ïß³ÌÌṩÁËÒ»ÏîºÜÓмÛÖµµÄ·þÎñ£¬¼«´óµØÔöÇ¿ÁËJava³ÌÐòÉè¼ÆÓïÑԵŦÄÜ¡£È»¶ø£¬Ä¿Ç°µÄÏß³ÌʵÏÖµÄÈ·´æÔÚһЩÎÊÌâ¡£ÕâЩÎÊÌâµÄ´æÔÚ£¬Ê¹µÃSun JDK 1.2ÖÐÏ̵߳Ästop£¬ suspendºÍresume·½·¨µ¼ÖÂÈËÃǵÄÅúÆÀ¡£

Èç¹ûÎÒÃǻص½ÉÏÃæµÄÉú²úÕß/Ïû·ÑÕßÀý×Ó£¬ÎÒÃǾͿÉÒÔ¸üºÃµØÀí½âÕâ¸öÎÊÌâ¡£Ê×ÏÈ£¬ÎÒÃÇ¿´¿´ËÀËø¡£µ±ÔËÐÐÒ»¸öappletС³ÌÐòʱ£¬ÔÚͨ³£µÄÇé¿öÏ£¬Á½¸öÏß³ÌÔËÐÐʱ£¬Ïà°²ÎÞÊ£¬µ«ÊÇ£¬µ«Óû§µã»÷µ½ÁíÍâÒ»¸öÍøҳʱ£¬ÎÊÌâ³öÏÖÁË¡£Èç¹ûÉú²úÕßÕýÔÚÌí¼ÓÒ»¸öÏîÄ¿µ½ÁбíÖУ¬×µÄÇé¿ö¾ÍÊÇÏû·ÑÕßÏ̱߳»×èÈû¡£¼Ù¶¨£¬Ð¡³ÌÐòÕýÔÚ´´½¨Ò»¸ö¶ÔÏ󣬴ËʱͻȻ±»¹ÒÆð£¨suspended£©£¬ÆäËûµÄС³ÌÐò¾Í²»ÄÜÔÙ¶Ô¸ÃÊý¾Ý½øÐиüС£¾¡¹Ü³öÏÖÕâÑùµÄ»ú»á²»¶à£¬ËüÃǵÄÈ·´æÔÚ£¬ÓÐʱ»áÒýÆðÎÊÌâ¡£

Ï̵߳ĵڶþ¸öÎÊÌâÓйز»Ò»ÖµÄÎÊÌâ¡£ÔÙÀ´¿´Ò»ÏÂÉú²úÕß/Ïû·ÑÕßµÄÀý×Ó£¬²»ÄÑÏëÏó£¬Èç¹ûÉú²úÕßÏß³ÌÔÚÌí¼ÓÏîÄ¿µÄ¹ý³ÌÖÐÓöµ½±»ÖÐÖ¹µÄÇé¿ö£¬¿ÉÄÜ»áÔì³ÉÁбí״̬²»Ò»Ö¡£Èç¹ûÎÒÃÇÈ«Ãæ¼ì²éÏÖÓеÄJavaС³ÌÐòµÄ¸öÊý£¬¾Í²»ÄÑ·¢ÏÖÎÊÌâËùÔÚ¡£

´¦ÀíÕâ¸ö²»Ò»ÖµÄÎÊÌâµÄ×î¼òµ¥µÄ·½·¨¾ÍÊÇÅÉÉúÒ»¸öеÄÏß³ÌÀ࣬¸ÃÏß³ÌÀà¾ßÓÐÈçϹ¦ÄÜ£ºÍ¨¹ýÒ»¸ö·½·¨µÄµ÷ÓÿÉÒԸıäÆä״̬¡£±íD¾Í¶¨ÒåÁËÕâÑùµÄÒ»¸öÀà¡£MyThreadÀà¿ÉÒÔ±»¹ÒÆðºÍÖØÐÂÖ´ÐУ¬¶øÎÞÐèµ£ÐÄMyThreadÀàµÄ×ÊÔ´»á±ÀÀ£¡£MyThreadÀàÖеķ½·¨ changeStateÓÃÓÚ°µÊ¾Ó¦¸ÃÔÝÍ££¬Í£Ö¹»òÕßÖØÐÂÖ´ÐÐỊ̈߳¬¶ø²»Í¬ÓÚÒÔÍùµÄÍ£Ö¹»òÕßÔÝÍ£Ï̡߳£¿ÉÒÔÏòÏ̷߳¢³öÇëÇó£¬ÒªÇóÏß³ÌÔÚºÏÊʵÄʱºò´¦Àí¸ÃÇëÇ󣬶ø²»ÊÇÇ¿ÖÆ´¦Àí¸ÃÇëÇó£¬Òò¶øÎÞÐèÏòÏ̷߳¢³öÍ£Ö¹ÃüÁî¡£

±íD: Class MyThread

public class MyThread extends Thread {
//States the thread can be in.
static final int STATE_RUNNING = 0;
static final int STATE_STOP = 1;
static final int STATE_SUSPEND = 2;
private int currentState = STATE_RUNNING;
// The public method changeState allows
// another process to poke at that hread
// and tell it to do something when it
// next gets a chance.
public final synchronized void
changeState(int newState) {
currentState = newState;
if (STATE_RUNNING == currentState)
notify();
// Must have been suspended.
}
private synchronized boolean currentState() {
// If we where asked to suspend,
// just hang out until we are
// asked to either run or stop.
while ( STATE_SUSPEND == currentState) {
try{ wait(); }
catch (Exception e) {};
}
if ( STATE_STOP == currentState )
return false;
else
return true;
}
public void run() {
do {
if (currentState() == false)
return; // Done
// Perform some work
} while (true);
}
}


MyThreadÀàµÄÓû§¿ÉÒÔÖØÔØrun·½·¨£¬È»¶ø£¬Óû§ÐèÒª¼ì²éÊÇ·ñÓÐÁíÍâµÄÀàÇëÇóÏ̸߳ıä״̬¡£ÔÚJDK 1.2 ÖжÔÏ̵߳ÄÔËÐлúÖÆËù×öµÄ¸Ä±ä£¬ÊÇÎÊÌâµÄÖ¢½áËùÔÚ£¬Ïß³ÌÔÚÔËÐÐʱÊÇ·ñ³öÏÖ²»Ò»Ö£¬ÔÚÏ̹߳رպó£¬ÊÇ·ñ·ÅÆúËùÕ¼ÓõÄ×ÊÔ´£¬Ï̵߳ÄÔËÐÐÊÇ·ñÕý³££¬ÕâЩ¹¤×÷¶¼ÊÇÒª¿ª·¢Õß×Ô¼ºÀ´È·±£Íê³ÉÁË¡£

½áÂÛ
Ï̹߳¦ÄÜÇ¿´ó¶øʹÓø´ÔÓ¡£Ã¿Î»Java¿ª·¢Õß¿ÉÒÔÔںܶàÓ¦Óó¡ºÏÓõ½Ï̡߳£±¾ÎÄÖУ¬ÎÒÃǼì²éÁËÏ̵߳ÄһЩ¸±×÷Óã¬ÒÔ¼°Ï̵߳ÄһЩ¸ß¼¶Ó÷¨¡£Ëæ×Å Sun JDK 1.2µÄÍƳö£¬¿ª·¢ÕßÃǽ«±»ÆȶÔÆä±àдµÄÏ̶߳ÔϵͳºÍÆäËû½ø³ÌµÄ×÷Óùý³Ì¿¼Âǵøü¼ÓÖܵ½¡£×îÖÕ£¬¶ÔÓÚÏ̼߳°ÆäÏà¹Ø֪ʶµÄÕýÈ·Àí½â£¬½«»áÓÐÖúÓÚ´ÏÃ÷µÄ¿ª·¢ÕßÉè¼Æ³ö¸ü¼Ó½¡×³µÄÓ¦ÓóÌÐò¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ