Article View: borland.public.jbuilder.java.language
Article #17118Executing DOS Program from JAVA
From: Arumugam
Date: Fri, 11 Dec 1998 00:00
Date: Fri, 11 Dec 1998 00:00
89 lines
3148 bytes
3148 bytes
--------------00D96799F0FAB74EABA6CC31
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
I tried to call the DOS program in my JAVA applications.
I tried this way..
-------------------
String fileName = "bin/test.exe";
String sys = System.getProperty("os.arch");
String os = System.getProperty("os.name");
try
{
Process p = Runtime.getRuntime().exec("start "+fileName);
}
catch(IOException e)
{
System.err.println("IOException : "+e);
}
---------------------
But I could not find any effect.
The same thing happened when I did start bin/test.exe in the dos
prompt.
But in DOS, after changing the directory path to bin and executed
start test.exe, it works fine.
Please POINT me where I am wrong..!!! Please suggest me to solve
this problem
Thanks in advance
Arumugam
--
B. Arumugam
Mitsubishi Space Software, JAPAN.
Phone ; +81-467-47-6708
E-Mail : arumugam@kbo.mss.co.jp
--------------00D96799F0FAB74EABA6CC31
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<HTML>
Hi,
<BR> I tried to call the DOS program in my JAVA applications.
<BR> I tried this way..
<BR> -------------------
<BR> String fileName = "bin/test.exe";
<BR> String sys = System.getProperty("os.arch");
<BR> String os = System.getProperty("os.name");
<P> try
<BR> {
<BR> Process p = Runtime.getRuntime().exec("start
"+fileName);
<BR> }
<BR> catch(IOException e)
<BR> {
<BR> System.err.println("IOException
: "+e);
<BR> }
<BR> ---------------------
<P> But I could not find any effect.
<BR> The same thing happened when I did start bin/test.exe
in the dos prompt.
<BR> But in DOS, after changing the directory path to
bin and executed start test.exe, it works fine.
<P> Please POINT me where I am wrong..!!! Please
suggest me to solve this problem
<P> Thanks in advance
<P> Arumugam
<PRE>--
B. Arumugam
Mitsubishi Space Software, JAPAN.
Phone ; +81-467-47-6708
E-Mail : arumugam@kbo.mss.co.jp</PRE>
</HTML>
--------------00D96799F0FAB74EABA6CC31--
Technical Details
Message-ID:
<3670AF84.1C7BBFF5@kbo.mss.co.jp>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,1b4b685d30b5edd2,start X-Google-Attributes: gidf74b3,public From: Arumugam <arumugam@kbo.mss.co.jp> Subject: Executing DOS Program from JAVA Date: 1998/12/11 Message-ID: <3670AF84.1C7BBFF5@kbo.mss.co.jp> X-Deja-AN: 421079302 Content-Type: multipart/alternative; boundary="------------00D96799F0FAB74EABA6CC31" Organization: Mitsubishi Space Software, JAPAN Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language