I am quite new to Java. I am trying to make a utility for myself that can do the following:
1) go and execute C:\start\start1.bat 2) go and execute C:\start\start2.bat 3) go and execute C:\start\start3.bat
Right now what I do is personally go to these folders and click on these files to start them (so I get three command window popups and they are running the commands that are present in these files). If I am able to make a java program to execute these three steps in just one hit I can reduce clicking three files. Please help me out in this, I know that this is like asking someone to do homework but I would appreciate any pointers or help.
Java isn't really suited for this job. It would be easier to write a shell script that does this. If you really want to use Java, check out java.lang.Runtime.exec. It lets you execute processes that run outside of the JVM.
And I have no idea why, given prashant's admitted newbie-ness, we're discussing this in the Advanced Java forum! I'm moving this to Java in General (Beginner) for followup questions about Runtime.exec().