Wednesday, April 20, 2005

executing programs

Code to execute windows programs thru java

 

 

public class RunExec

{

            public static void main(String args[])

            {

            String path="notepad";

            try

            {

                        Process p = Runtime.getRuntime().exec("RunDLL32.EXE shell32.dll,ShellExec_RunDLL " + path);

            }

            catch(Exception e )

            {

                        System.err.println(e);

            }

            }

}

 

 

 

Pradyut
http://pradyut.tk
http://groups.yahoo.com/group/d_dom/
http://groups-beta.google.com/group/oop_programming
India

 

No comments: