• Welcome to Dark Bit Factory & Gravity.
 

Help Java substitute for QB's "Shell" statement.

Started by relsoft, February 26, 2009

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

relsoft

I'm helping a friend of mine with his thesis (An OS algo simulation) and since we're out of time (Due on March) I'm making the demos in FreeBasic that could be called from Java using a "shell" subtitute.

Shell runs an EXE file and returns the control to the caller after the shelled program terminates.


Is there a way to shell in Java?

Thanks!!!

Challenge Trophies Won:

Jim

If you can call Windows API, then ShellExecute() will do it.

Also, java.lang.System.exec()
http://dmi.ensica.fr/doc/java/j2sdk-1_4_2-doc/docs/api/java/lang/Runtime.html
Looks like
getRuntime().exec("c:/testprogram.exe");
might work.

Jim
Challenge Trophies Won:

relsoft

Challenge Trophies Won: