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

Javaµ÷ÓÃϵͳÃüÁîѧϰ£¨¶þ£©

¾­¹ýÉÏһƪµÄѧϰ£¬Ó¦¸Ã¶ÔJavaÖеÄRuntimeÀàµÄexec·½·¨ÁË´óÖµÄÁ˽⣬Ҳ֪µÀÓ¦¸ÃÈçºÎȥʹÓÃÁË°É¡£
Ê×ÏÈѧϰÏ£ºProcessÀà¡£
¼òµ¥µØ²âÊÔһϣº
µ÷ÓÃJavacÃüÁ²¢²é¿´Ö´ÐÐÃüÁîµÄ·µ»ØÖµ£¬²¢Êä³öµ½¿ØÖÆ̨ÉÏÈ¥¡£
import java.io.IOException;
class Exec_Javac{
public static void main(String []args)throws IOException{
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("javac");
int exitValue = p.exitValue();
System.out.println("Process exitValue="+exitValue);
}
}
//Ö´Ðнá¹û£º
Exception in thread "main" java.lang.IllegalThreadStateException: process hasn't exited
at java.lang.UNIXProcess.exitValue(UNIXProcess.java:172)
at Exec_Javac.main(Exec_Javac.java:6)

ºÇºÇ£¬´ÓÉÏÃ棬ÎÒÃÇ¿ÉÒÔÖªµÀ£¬²¢²»Äܵõ½ÎÒÃÇÏëÒªµÄ½á¹û¡£ÖÁÓÚʲôԭÒòÄØ¡£
ÏÂÃæÒ»¶Î»°Ö±½ÓÒýÓñðÈ˵ģº£¨Ëü±È½ÏÏêϸµØ½²ÊöÁ˳ö´íµÄÔ­Òò£©
ÕâÀïÖ÷ÒªµÄÎÊÌâ¾ÍÊÇ´íÎóµÄµ÷ÓÃÁËexitValueÀ´È¡µÃÍⲿÃüÁîµÄ·µ»ØÖµ£¨ºÇºÇ£¬Õâ¸ö´íÎóÎÒÒ²Ôø¾­·¸¹ý£©£¬ÒòΪ
exitValueÕâ¸ö·½·¨ÊDz»×èÈûµÄ£¬³ÌÐòÔÚµ÷ÓÃÕâ¸ö·½·¨Ê±ÍⲿÃüÁûÓзµ»ØËùÒÔÔì³ÉÁËÒì³£µÄ³öÏÖ£¬ÕâÀïÊÇÓÉÁíÍâµÄ·½·¨À´µÈ´ýÍⲿÃüÁîÖ´ÐÐÍê±ÏµÄ£¬¾Í
ÊÇwaitFor·½·¨£¬Õâ¸ö·½·¨»áÒ»Ö±×èÈûÖ±µ½ÍⲿÃüÁîÖ´ÐнáÊø£¬È»ºó·µ»ØÍⲿÃüÁîÖ´ÐеĽá¹û£¬×÷ÕßÔÚÕâÀïÒ»¶ÙÅúÆÀÉè¼ÆÕßµÄ˼·ÓÐÎÊÌ⣬ºÇºÇ£¬·´ÕýÎÒÊÇÎÞ
Ëùν°¢£¬ÄÜÓþͿÉÒÔÀ­¡£µ«ÊÇ×÷ÕßÔÚÕâÀïÓÐÒ»¸ö˵Ã÷£¬¾ÍÊÇexitValueÒ²ÊÇÓкöàÓÃ;µÄ¡£ÒòΪµ±ÄãÔÚÒ»¸öProcessÉϵ÷ÓÃwaitFor·½·¨Ê±£¬
µ±Ç°Ïß³ÌÊÇ×èÈûµÄ£¬Èç¹ûÍⲿÃüÁîÎÞ·¨Ö´ÐнáÊø£¬ÄÇôÄãµÄÏ߳̾ͻáÒ»Ö±×èÈûÏÂÈ¥£¬ÕâÖÖÒâÍâ»áÓ°ÏìÎÒÃdzÌÐòµÄÖ´ÐС£ËùÒÔÔÚÎÒÃDz»ÄÜÅжÏÍⲿÃüÁîʲôʱºòÖ´ÐÐÍê
±Ï¶øÎÒÃǵijÌÐò»¹ÐèÒª¼ÌÐøÖ´ÐеÄÇé¿öÏ£¬ÎÒÃǾÍÓ¦¸ÃÑ­»·µÄʹÓÃexitValueÀ´È¡µÃÍⲿÃüÁîµÄ·µ»Ø״̬£¬²¢ÔÚÍⲿÃüÁî·µ»Øʱ×÷³öÏàÓ¦µÄ´¦Àí¡£
ÄÇôºÃ£¬¼ÈÈ»³ö´íÁË£¬µ±È»ÒªÐÞ¸ÄÀ²£º
¸ÄΪÈçÏ£º
import java.io.IOException;
class Exec_Javac{
public static void main(String []args)throws IOException,InterruptedException{
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("javac");
//i


Ïà¹ØÎĵµ£º

JavaÃοªÊ¼µÄµØ·½

JavaÃοªÊ¼µÄµØ·½
Ï£ÍûÊǼáÈ͵ĹÕÕÈ£¬ÈÌÄÍÊÇÂÃÐдü£¬Ð¯´øËüÃÇ£¬ÈË¿ÉÒÔµÇÉÏÓÀºãÖ®ÂÃ;¡£--Bertrand Russell
Java:¸ßЧ¿ì½Ý¿çƽ̨¿ÉÒÆÖ²
³ÌÐòÔ±£ºJavaÓïÑÔ±¾Éí£¨»ù±¾Óï·¨ºÍ¸ÅÄԭÀíÓ¦Óã©£»JavaÓ¦Óÿª·¢
Êé¼®£ºJava±à³Ì˼Ï룻Java½Ì³Ì£»ÉîÈ뿪·¢Java Web¿ª·¢ÄÚÄ»µÈ
ÃοªÊ¼µÄµØ·½
01Ò»ÃÅÓïÑÔ¾«Í¨µÄ±ØÒªÌõ¼þ
02²Ù×÷ÏµÍ ......

java ¶ÁÈ¡²¢±£´æexcelÖеÄͼƬ

/*
     * ±£´æexcelÖеÄͼƬ(ÒÔÎļþÐÎʽ±£´æ£¬»òÕß´æÈëÊý¾Ý¿â)
     *
     * basePath:Ó¦ÓÃËùÔÚ·¾¶,¸½¼þ´æ·Å·¾¶:
     * ²ÎÊý£ºisÊÇÉÏ´«µÄ¸½¼þÎļþÁ÷
     */
    public void saveSheet ......

JAVA(Îå)


JavaÔÓ̸£¨Ê®Ò»£©??ORM 
        ÕâÊÇ×îºóһƪJavaÔÓ̸ÁË£¬ÒÔORM¿ò¼ÜµÄ̸ÂÛÊÕ⣬ҲËãÊÇ°ÑJ2eeµÄ×îºóÒ»·½Ãæ¸øº­¸Çµ½ÁË£¬Ö®ËùÒÔÕâôÍí²Å×ܽá³öORMÕâ·½Ã棬һÊDZÊÕßÕâÁ½ÖܱȽÏ棬ÁíÒ»·½ÃæÒ²ÏëÉÆʼÉÆÖÕ£¬×ÐϸµÄÏÈ×Ô¼ººÃºÃÑо¿Ò»ÏÂORM¿ò¼Ü¼¼Êõ£¬²»Ïë²ÝÂʵķóÑÜÁËÊ¡£ &n ......

java rmi¼òµ¥Àý×Ó

----------½Ó¿Ú------------
import java.rmi.*;
public interface HelloIn extends java.rmi.Remote{
 String sayHello() throws RemoteException;
}
--------ʵÏÖÀà-------------
import java.rmi.*;
import java.net.*;
import java.rmi.registry.*;
import java.rmi.server.*;
public class Hello exten ......

javaÓë.netµÄweb serviceÏ໥µ÷ÓÃ

Ò»:¼ò½é
±¾ÎĽéÉÜÁËJavaÓë.NET¿ª·¢µÄWeb ServicesÏ໥µ÷Óõļ¼Êõ¡£±¾ÎÄ°üÀ¨Á½¸ö²¿·Ö£¬µÚÒ»²¿·Ö½éÉÜÁËÈçºÎÓÃ.NET×ö¿Í»§¶Ëµ÷ÓÃJavaдµÄWeb Services,µÚ¶þ²¿·Ö½éÉÜÁËÈçºÎÓÃJava×ö¿Í»§¶Ëµ÷ÓÃ.NET¿ª·¢µÄWeb Services¡£ ¡¡
¡¡
¶þ:ÏîÄ¿ÐèÒªµÄ¹¤¾ß¡¡¡¡
WindowsXP Professial(IIS)
¡¡ Eclipse3.1(ÒÑ×°ºÃTomcat axis)
¡¡¡¡VS ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ