Perry Smith

Java Questions & Answers

Archive

Home / Java Q & A Archive Page 4 / Java Q & A Archive / Java Main Page

Dos platform
Thursday, 27-May-1999 07:39:27

203.197.130.192 writes:

Hi Java wizards,

I started developing a IDE for Java in Java. I have a problem in that. My problem is

It is possible to execute the native operating system i.e., Windows 95 programs (for example calci,paintbrush e.t.c.,)by using exec from the runtime class (in java.lang).Similarly how do i run a dos program such as javac, java , dir, cls.

K.Ramamurthy


Re: Dos platform
Friday, 28-May-1999 03:17:41

202.54.33.88 writes:

Hi,
I haven't tried this, but i think u can run javac without any problem.. i also don't think u can run the internal dos commands like cls, dir... just try using javac as u did with other .exe files..

ganesh


Re: Dos platform
Monday, 31-May-1999 18:09:59

195.249.52.43 writes:


Hi, You can try this code :


Process p = Runtime.getRuntime().exe("cmd /c dir");
But you must first import java.lang.System;

CCQ


Re: Re: Dos platform
Wednesday, 09-Jun-1999 06:29:46

203.197.131.76 writes:


Hi,
Thaks for the same. The code given by u is not executing morover there is no method exe() in Runtime class exec() is there. Please reply.


Thanks,
KRM

K.Ramamurhy to CCQ


Re: Re: Re: Dos platform
Wednesday, 09-Jun-1999 18:56:47

195.249.27.102 writes:

Hi,
u can try again with this code, if u run Windows 95/98 :

Process p = Runtime.getRuntime().exec( command.com /c dir );

good luck!

CCQ


Home / Java Q & A Archive Page 4 / Java Q & A Archive / Java Main Page