🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #19102

Re: ����java����windows��cmd����

#19102
From: ...
Date: Sun, 11 Jan 2004 02:32
20 lines
1792 bytes
1�������дһ��bat�ļ�����cmd���д��ȥ
   Ȼ�����Runtime.getRuntime().exec("**.bat");
   ��������Ļ�����̨���񲻻ᵯ������������ò�Ҫ������ͼ�ν�����������

2����JNI����windows api, ShellExecute()��
   ��ShellExecute��ִ��"**.bat"
   ���ַ����ȽϺã��������������˫��"**.batһ��
   ���ǿ��Կ�cmd�����ڿ���̨��ִ����Ϣ

�� �� jiakang.bbs@bbs.sjtu.edu.cn (��ǧ��) �Ĵ������ᵽ: ��
: ��д��һ������
: process = Runtime.getRuntime().exec("cmd");
: Thread.sleep(10*1000);
: process.destroy();
: ������û�е�������̨��Ҳû�н����һֱ��������
: ���������javaִ��windows��cmd���


--
�� ��Դ:��Ʈ��ˮ�Ƽ� freecity.cnzju.net��[FROM: flysword]
Technical Details
Message-ID: <4ADLbE$AOO@freecity.cnzju.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsgate.cuhk.edu.hk!news.zixia.net!news.ccie.net.cn!Freecity

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,622eb5a223771a1f
X-Google-Attributes: gidf6cb0,public
X-Google-ArrivalTime: 2004-01-10 18:35:17 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsgate.cuhk.edu.hk!news.zixia.net!news.ccie.net.cn!Freecity
From: flysword.bbs@freecity.cnzju.net (...)
Newsgroups: cn.bbs.comp.lang.java
Subject: Re: ����java����windows��cmd����
Date: 11 Jan 2004 02:32:26 GMT
Organization: Ʈ��ˮ�Ƽ�
Message-ID: <4ADLbE$AOO@freecity.cnzju.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Java/M.1073787902.A
Lines: 20