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
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
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
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
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