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

Ò»¸ö¼òµ¥javaС³ÌÐò´ò°ü³ÉEXEÔËÐÐÎļþ

ÔÚ²©¿ÍÔ°ÉÏ¿´µ½ÕâÑùµÄ´úÂ룬°ÑËü´ò°ü³ÉÒ»¸öexeÎļþ
public class Test
{
    public static void main(String[] args)
    {
        String str="C:\\Program Files\\Tencent\\TM2009\\Bin\\TM.exe";
        try
        {
            Process p= Runtime.getRuntime().exec(str);
           
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
    }
}
1.Ê×ÏÈÔÚEclipseÀïÃæ°ÑclassÎļþ´ò°ü³ÉÒ»¸ö.jar°ü
2.jar°üת»»³ÉEXE³ÌÐòʹÓÃEXE4j¹¤¾ß£¬¾ßÌå²Î¿¼
http://binghexunjian.blog.163.com/blog/static/122355152200911323536850/


Ïà¹ØÎĵµ£º

java²¹Âë ·´Âë

¹Ø¼ü×Ö: µ×²ãÊý¾Ý Ãû´Ê½âÊÍ£º ²¹Â룺1 ÔÚ¼ÆËã»úϵͳÖУ¬ÊýÖµÒ»ÂÉÓв¹ÂëÀ´±íʾ(´æ´¢). ʹÓò¹Âë,¿ÉÒÔ½«·ûºÅλºÍÆäËûλͳһ´¦Àí;ͬʱ,¼õ·¨Ò²¿É°´¼Ó·¨À´´¦Àí.ÁíÍâ,Á½¸öÓò¹Âë±íʾµÄÊý¾ÝÏà¼Óʱºò,Èç¹û×î¸ßλ(·ûºÅλ)Óнøλ,Ôò½øÎ¥±»ÉáÆú. 2 ²¹ÂëÓëÔ­ÂëµÄת»»¹ý³Ì¼¸ºõÊÇÏàͬµÄ ÊýÖµµÄ²¹Âë±íʾҲ·ÖÁ½ÖÖÇé¿ö£º £¨1£©ÕýÊýµÄ²¹Âë:ÓëÔ ......

JAVA³£ÓòÙ×÷Óï¾ä ÏîÄ¿ÖеÄ×ܽáËÄ


 eclipseÑ¡Ò»¸ö±äÁ¿ºó£¬Õâ¸öÀàÀïµÄ¸Ã±äÁ¿²»±äÉ«ÎÊÌâ½â¾ö£º
alt + shift + o

/**
* дÈëÈÕÖ¾
* filePath ÈÕÖ¾ÎļþµÄ·¾¶
* code ҪдÈëÈÕÖ¾ÎļþµÄÄÚÈÝ

*/

public

static

boolean
print(String filePath,String code) {

try
{
File tofile
=
new
File(filePath);
......

Java µ÷ÓÃEXE

ʹÓÃRuntime.getRuntime().exec()·½·¨¿ÉÒÔÔÚjava³ÌÐòÀïÔËÐÐÍⲿ³ÌÐò.  
  ¸Ã·½·¨ÓÐ6¸ö¿É·ÃÎÊ°æ±¾:  
  1.exec(String   command)  
  2.exec(String   command,   String   envp[],   File   dir)    
  3.exec(String   cmd, &n ......

ÈÃEclipseÏÂJavaÏîÄ¿ÓëjavadocsÁµÉÏ

ÔÚEclipseÖÐÁ¬ÉÏjavadocsÎĵµ
 
Ò»¡¢             °²×°Eclipse
¶þ¡¢             ´ÓOracle¹ÙÍø»òÕßsunÒÔÇ°µÄ¹ÙÍøÉÏÏÂÔØJavaÏàÓ¦µÄdocsÎĵµ
Èý¡¢      & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ