Lets suppose I have a listener for a Button
public class Visualizer1 implements ActionListener {
        public void actionPerformed(ActionEvent a) {
            try {
                Runtime rt2 = Runtime.getRuntime();
                Process p = rt2.exec("visualizer/vis1.exe");
                InputStream in = p.getInputStream();
                OutputStream out = p.getOutputStream();
                InputStream err = p.getErrorStream();
                p.destroy();
            } catch (Exception exc) {/* handle exception */
            }
the "vis1.exe" will execute without any problem and it will open up but if I have an application with a ".bat" extension like if it was(vis1.bat), it won't open up. Note: .bat extension is an executable file
 
     
     
     
    