🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17118

Executing DOS Program from JAVA

#17118
From: Arumugam
Date: Fri, 11 Dec 1998 00:00
89 lines
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>&nbsp;&nbsp;&nbsp; I tried to call the DOS&nbsp;program in my JAVA&nbsp;applications.
<BR>&nbsp;&nbsp;&nbsp; I tried this way..
<BR>&nbsp;&nbsp;&nbsp; -------------------
<BR>&nbsp;&nbsp;&nbsp; String fileName = "bin/test.exe";
<BR>&nbsp;&nbsp;&nbsp; String&nbsp; sys = System.getProperty("os.arch");
<BR>&nbsp;&nbsp;&nbsp; String&nbsp; os = System.getProperty("os.name");

<P>&nbsp;&nbsp;&nbsp; try
<BR>&nbsp;&nbsp;&nbsp; {
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Process p = Runtime.getRuntime().exec("start
"+fileName);
<BR>&nbsp;&nbsp;&nbsp; }
<BR>&nbsp;&nbsp;&nbsp; catch(IOException e)
<BR>&nbsp;&nbsp;&nbsp; {
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.err.println("IOException
:&nbsp;"+e);
<BR>&nbsp;&nbsp;&nbsp; }
<BR>&nbsp;&nbsp;&nbsp; ---------------------

<P>&nbsp;&nbsp;&nbsp; But I could not find any effect.
<BR>&nbsp;&nbsp;&nbsp; The same thing happened when I did start bin/test.exe
in the dos prompt.
<BR>&nbsp;&nbsp;&nbsp; But in DOS, after changing the directory path to
bin and executed start test.exe, it works fine.

<P>&nbsp;&nbsp;&nbsp; Please POINT me where I am wrong..!!!&nbsp; Please
suggest me to solve this problem

<P>&nbsp;&nbsp;&nbsp; Thanks in advance

<P>&nbsp;&nbsp;&nbsp; Arumugam
<PRE>--&nbsp;
B. Arumugam
Mitsubishi Space Software, JAPAN.&nbsp;
Phone ; +81-467-47-6708
E-Mail : arumugam@kbo.mss.co.jp</PRE>
&nbsp;</HTML>

--------------00D96799F0FAB74EABA6CC31--
Technical Details
Message-ID: <3670AF84.1C7BBFF5@kbo.mss.co.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show 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