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

´Ójava³ÌÐòÖе÷ÓÃÆäËü³ÌÐò

RMI (Remote Method Invocation£¬Ô¶³Ì·½·¨µ÷ÓÃ)ÈçºÎÓÃÓÚ³ÌÐò¼äͨѶ£¬ÁíÒ»¸öÓÃÓÚͨѶµÄ¼¼ÊõÊÇRuntime.exec() ·½·¨¡£Äã¿ÉÒÔÓÃÕâ¸ö·½·¨´ÓÒ»¸öÔËÐа¢java³ÌÐòÖе÷ÓÃÁíÒ»¸ö³ÌÐò¡£Runtime.exec Ò²ÔÊÐíÄãÖ´ÐкͳÌÐòÏà¹ØµÄ²Ù×÷£¬ÀýÈç¿ØÖÆ³ÌÐòµÄ±ê×¼ÊäÈëÊä³ö£¬µÈ´ý³ÌÐòµÄ½áÊø²¢µÃµ½ËüµÄÍ˳ö״̬¡£ÏÂÃæÊÇÒ»¸ö¼òµ¥µÄC³ÌÐò£¬ÓÃÀ´ËµÃ÷ÕâÐ©ÌØÐÔ£º
    #include <stdio.h>
    int main() {
        printf("testing\n");
        return 0;
    }
Õâ¸ö³ÌÐòд×Ö·û´®"testing"µ½±ê×¼Êä³ö£¬È»ºóÓÃÍ˳ö״̬0ÖÕÖ¹³ÌÐò¡£
ΪÁËÔÚjava³ÌÐòÖÐÖ´ÐÐÕâ¸ö¼òµ¥µÄ³ÌÐò£¬ÏȱàÒëÕâ¸öc³ÌÐò£º
    $ cc test.c -o test
£¨ÒëÕß×¢£º¶ÔÓÚlinuxÓû§£¬¿ÉÒÔÓÃgcc test.c ?o test,¶ÔÓ¦windowsÓû§¿ÉÒÔÓÃÏàÓ¦µÄcÓïÑÔ±àÒë³ÌÐò±àÒë³É¿ÉÖ´ÐгÌÐòtest.exe£©    
(ÄãµÄ C ±àÒëÆ÷¿ÉÄÜÒªÇó²»Í¬µÄ²ÎÊý)È»ºóʹÓÃÏÂÃæµÄ´úÂëµ÷ÓÃÄǸö³ÌÐò£º
    import java.io.*;
    import java.util.ArrayList;
    
    public class ExecDemo {
        static public String[] runCommand(String cmd)
            throws IOException {
    
            // set up list to capture command output lines
    
            ArrayList list = new ArrayList();
    
            // start command running
   
Process proc = Runtime.getRuntime().exec(cmd);
/**ÒëÕß×


Ïà¹ØÎĵµ£º

JAVA ComparatorºÍComparableÔÚÅÅÐòÖеÄÓ¦ÓÃ

ComparatorºÍComparableÔÚÅÅÐòÖеÄÓ¦ÓÃ
µ±ÐèÒªÅÅÐòµÄ¼¯ºÏ»òÊý×é²»Êǵ¥´¿µÄÊý×ÖÐÍʱ£¬Í¨³£¿ÉÒÔʹÓÃComparator»òComparable£¬ÒÔ¼òµ¥µÄ·½Ê½ÊµÏÖ¶ÔÏóÅÅÐò»ò×Ô¶¨ÒåÅÅÐò¡£
Ò»¡¢Comparator
Ç¿ÐжÔij¸ö¶ÔÏócollection½øÐÐÕûÌåÅÅÐòµÄ±È½Ïº¯Êý£¬¿ÉÒÔ½«Comparator´«µÝ¸øCollections.sort»òArrays.sort¡£
½Ó¿Ú·½·¨£º
   ......

Javaʼþ»úÖÆÀí½â¼°Ó¦ÓÃ

1£®´Ó×ÜÌ忴ʼþ»úÖÆ
Æäʵʼþ»úÖÆÊÇÒ»ÖÖ´¦ÀíÊÀ½çµÄ·½Ê½ºÍ·½·¨¡£´«Í³µÄ˳Ðò³ÌÐòÉè¼Æ×ÜÊǰ´ÕÕÁ÷³ÌÀ´°²ÅÅËù×öµÄ¹¤×÷£¬¶øÊ¼þ»úÖÆµÄÌØµãÔÚÓÚ£ºµÈ´ý£¬Èç¹ûÓÐÊÂÇé·¢ÉúÔò´¦ÀíÖ®¡£ÕâÑùµÄºÃ´¦ÊÇ˳Ðò³ÌÐòÉè¼ÆÔÚûÓÐÊÂÇé×öµÄʱºòÒ²±ØÐëÑ­»·ÔËÐУ¬×öºÁÎÞЧÂʵĿյÄÑ­»·¹¤×÷¡£¶øÊ¼þ»úÖÆÔÚûÓÐÊÂÇéµÄʱºòÔò¿ÉÒÔ²»×öÈκÎÊÂÇéµÄµÈ´ý£¬´Ó¶ ......

É÷ÓÃJava×°ÏäÓë²ðÏä

ת×Ôhttp://xyiyy.javaeye.com/blog/358401
J2SE5.0ºóÌṩÁË×Ô¶¯×°ÏäÓë²ðÏäµÄ¹¦ÄÜ£¬´Ë¹¦ÄÜÊÂʵÉÏÊDZàÒëÆ÷À´°ïÄúµÄ棬±àÒëÆ÷ÔÚ±àÒëʱÆÚÒÀÄúËù±àдµÄ·½·¨£¬¾ö¶¨ÊÇ·ñ½øÐÐ×°Ïä»ò²ðÏ䶯×÷¡£ÀýÈ磺
                     ......

Inner classes in Java, the mystery within.

Inner classes, also called Nested Classes, are nothing but classes that are defined within other classes. The nesting is a relationship between classes, not objects.
Inner classes have clearly two benefits, name control & access control. In Java, this benefit is not as important because Java pa ......

JavaÃæÊÔ¾­µäÊÔÌâ¼°´ð°¸

µÚÒ»£¬Ì¸Ì¸final, finally, finalizeµÄÇø±ð¡£ ¡¡¡¡
final—ÐÞÊηû£¨¹Ø¼ü×Ö£©Èç¹ûÒ»¸öÀà±»ÉùÃ÷Ϊfinal£¬Òâζ×ÅËü²»ÄÜÔÙÅÉÉú³öеÄ×ÓÀ࣬²»ÄÜ×÷Ϊ¸¸Àà±»¼Ì³Ð¡£Òò´ËÒ»¸öÀ಻Äܼȱ»ÉùÃ÷Ϊ
abstractµÄ£¬ÓÖ±»ÉùÃ÷ΪfinalµÄ¡£½«±äÁ¿»ò·½·¨ÉùÃ÷Ϊfinal£¬¿ÉÒÔ±£Ö¤ËüÃÇÔÚʹÓÃÖв»±»¸Ä±ä¡£±»ÉùÃ÷ΪfinalµÄ±äÁ¿±ØÐëÔÚÉùÃ÷ʱ¸ø¶¨ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ