ÓÃJava½Ó¿ÚʵÏֻص÷º¯ÊýµÄµÈ¼Û¹¦ÄÜ
ÓÃJava½Ó¿ÚʵÏֻص÷º¯ÊýµÄµÈ¼Û¹¦ÄÜ
Ê×ÏÈ£¬¿´Ò»Ï»ص÷º¯ÊýµÄ¶¨Òå¼°ÆðÔ´£º
¼ò¶øÑÔÖ®£¬»Øµ÷º¯Êý¾ÍÊÇÒ»¸öͨ¹ýº¯ÊýÖ¸Õëµ÷Óõĺ¯Êý£¬Èç¹ûÄã°Ñº¯ÊýµÄÖ¸Õë(µØÖ·)×÷Ϊ²ÎÊý´«µÝ¸øÁíÒ»¸öº¯Êý£¬µ±Õâ¸öÖ¸Õë±»ÓÃΪµ÷ÓÃËüËùÖ¸ÏòµÄº¯Êýʱ£¬ÎÒÃǾÍ˵Êǻص÷º¯Êý¡£
ΪʲôҪʹÓûص÷º¯Êý£¿
ÒòΪ¿ÉÒ԰ѵ÷ÓÃÕßÓë±»µ÷ÓÃÕß·Ö¿ª¡£µ÷ÓÃÕß²»¹ØÐı»µ÷ÓÃÕߣ¬ËùÓÐËüÐèÒªÖªµÀµÄ£¬Ö»ÊÇ´æÔÚÒ»¸ö¾ßÓÐijÖÖÌض¨ÔÐÍ£¬Ä³Ð©ÏÞÖÆÌõ¼þ(Èç·µ»ØֵΪint)µÄµ÷Óú¯Êý¡£
Èç¹ûÏëÖªµÀ»Øµ÷º¯ÊýÔÚʵ¼ÊÖÐÓÐʲô×÷Óã¬ÏȼÙÉèÓÐÒ»ÖÖÇé¿ö£¬ÎÒÃÇÒª±àдһ¸ö¿â£¬ËüÌṩÁËijЩÅÅÐòËã·¨µÄʵÏÖ£¬ÈçðÅÝÅÅÐò¡¢¿ìËÙÅÅÐò¡¢shellÅÅÐò¡¢shakeÅÅÐòµÈµÈ£¬µ«ÎªÁËʹ¿â¸ü¼ÓͨÓ㬲»ÏëÔÙº¯ÊýÖÐǶÈëÅÅÐòÂß¼£¬¶øÈÃʹÓÃÕßÀ´ÊµÏÖÏàÓ¦µÄÂß¼£»»òÕߣ¬ÏëÈÿâ¿ÉÓÃÓÚ¶àÖÖÊý¾ÝÀàÐÍ(int, float, string)£¬´Ëʱ£¬¸ÃÔõô°ìÄØ£¿¿ÉÒÔʹÓú¯ÊýÖ¸Õ룬²¢½øÐлص÷¡£»Øµ÷¿ÉÓÃÓÚͨÐÅ»úÖÆ£¬ÀýÈ磬ÓÐʱҪÔÚ³ÌÐòÖÐÉèÖÃÒ»¸ö¼ÆʱÆ÷£¬Ã¿µ½Ò»¶¨Ê±¼ä£¬³ÌÐò»áµÃµ½ÏàÓ¦µÄ֪ͨ£¬µ«Í¨Öª»úÖƵÄʵÏÖÕ߶ÔÎÒÃǵijÌÐòÒ»ÎÞËùÖª£¬¶ø´Ëʱ£¬¾ÍÐèÓÐÒ»¸öÌض¨ÔÐ͵ĺ¯ÊýÖ¸Õ룬ÓÃÕâ¸öÖ¸ÕëÀ´½øÐлص÷£¬À´Í¨ÖªÎÒÃǵijÌÐòʼþÒѾ·¢Éú¡£
ÔÚJavaÖ§³Ö·½·¨Ö¸Õë֮ǰ£¬Java½Ó¿Ú²»ÄÜÌṩһÖÖʵÏֻص÷º¯ÊýµÄºÃ·½·¨¡£ÊìϤMS-WindowsºÍX Window SystemʼþÇý¶¯±à³ÌÄ£Ð͵Ŀª·¢ÈËÔ±£¬Ï°¹ßÓÚ´«µÝÔÚijÖÖʼþ·¢Éúʱµ÷ÓÃ(¼´ “»Øµ÷”)µÄº¯ÊýÖ¸Õ룬JavaµÄÃæÏò¶ÔÏóÄ£ÐÍÄ¿Ç°²¢²»Ö§³Ö·½·¨Ö¸Õë¡£
JavaµÄ½Ó¿ÚÖ§³ÖÌṩһÖÖ»ñµÃ»Øµ÷µÄµÈ¼Û¹¦ÄܵĻúÖÆ¡£Æä¼¼ÇɾÍÊÇ£º¶¨ÒåÒ»¸ö¼òµ¥½Ó¿Ú£¬²¢ÔڸýӿÚÖÐÉùÃ÷ÎÒÃÇÒªµ÷Óõķ½·¨¡£
ÀýÈ磺¼Ù¶¨ÎÒÃÇÏ£ÍûÔÚij¸öʼþ·¢ÉúʱµÃµ½Í¨Öª¡£ÎÒÃÇ¿ÉÒÔ¶¨ÒåÒ»¸ö½Ó¿Ú£º
public interface InterestingEvent {
// Õâ½öÊÇÒ»¸ö³£¹æ·½·¨¡£Òò´ËÈç¹ûÐèÒª£¬
// Ëü¿ÉÒÔÓзµ»ØÖµ£¬Ò²¿É½ÓÊÕ²ÎÊý
public void interestingEvent();
}
ÕâʹµÃÎÒÃÇ¿ÉÒÔ¿ØÖÆʵÏָýӿÚÀàµÄÈκζÔÏó¡£Òò´Ë£¬ÎÒÃDz»±Ø¹ØÐÄÈκÎÍⲿÀàÐ͵ÄÐÅÏ¢¡£
public class EventNotifer {
private InterestingEvent ie;
private boolean somethingHappened
public EventNotifer(InterestingEvent event) {
Ïà¹ØÎĵµ£º
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.URIException;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.meth ......
package reflect;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class Test {
public static void main(String[] args) {
try {
Class c = Class.forName("reflect.Student");// ¸ù¾ÝÀàµÄÍêÕûÀàÃû´´½¨ÀàÏó
  ......
Ò»¸öÈí¼þÉè¼ÆµÄºÃ»µ£¬ÎÒÏëºÜ´ó³Ì¶ÈÉÏÈ¡¾öÓÚËüµÄÕûÌå¼Ü¹¹£¬¶øÕâ¸öÕûÌå¼Ü¹¹Æäʵ¾ÍÊÇÄã¶ÔÕû¸öºê¹ÛÉÌÒµÒµÎñµÄ³éÏó¿ò¼Ü£¬µ±´ú±íÒµÎñÂß¼µÄ¸ß²ã³éÏó²ã½á¹¹ ºÏÀíʱ£¬Äãµ×²ãµÄ¾ßÌåʵÏÖÐèÒª¿¼Âǵľͽö½öÊÇһЩËã·¨ºÍһЩ¾ßÌåµÄÒµÎñʵÏÖÁË¡£µ±ÄãÐèÒªÔÙ¿ª·¢ÁíÒ»¸öÏà½üµÄÏîĿʱ£¬ÄãÒÔÇ°µÄ³éÏó²ã˵²»¶¨»¹¿ÉÒÔÔÙ´ÎÀûÓà ÄØ£¬Ãæ¶Ô¶ÔÏóµÄÉè¼Æ ......
Java2ºËÐļ¼ÊõµÚÆß°æÖÐÎÄ°æµÚ¶þ¾í
µÚ600Ò³£¬¾¯¸æ´¦ÕâÑù˵£º
Èç¹û½«jar·ÅÈëjre/lib/extĿ¼ÖУ¬²¢ÇÒÔÚËüµÄÀàÖÐÓÐÒ»¸öÀàÐèÒªµ÷ÓÃϵͳÀà»òÕßÀ©Õ¹À࣬ÄÇô¾Í»áÓöµ½Âé·³¡£À©Õ¹Àà¼ÓÔØÆ÷²¢²»Ê¹ÓÃÀà·¾¶¡£
¸Õ¶Áµ½ÕâÀïÊ®·Ö²»½â£¬ÎªÊ²Ã´Óõ½ÏµÍ³Àà»òÀ©Õ¹Àà»á·¢Éú´íÎ󣿲¢ÇÒÒ»¸öÀàÔõô¿ÉÄܲ»»áÓõ½ÏµÍ³ÀࣿÓÚÊÇ£¬ÕÒµ½Ó¢ÎÄ°æÔÎÄÈ ......
½ñÌìÔÚhttp://www.51itdh.com/Õâ¸öÍøÕ¾ÉÏÕÒµ½ÓкöàJavaѧϰµÄ×ÊÁÏ£¬ËùÒÔÊÕ¼¯ÏÂÀ´¸ø´ó¼Ò·ÖÏíÏ¡£Õâ¸öÍøվͦ¶à±à³ÌÕâ·½Ãæ×ÊÔ´µÄ¡£
1.JavaѧϰÍøÕ¾:
JavaÖÐÎÄÊÀ½çÂÛ̳ http://www.chinajavaworld.com/index.jspa
JavaÊÀ¼ÍÍø &nbs ......