Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello i am trying to open a .bat file but unable. I tried this code
C#
try {
            // TODO add your handling code here:
                 Process proc = Runtime.getRuntime().exec("cmd /c start C:/Users/user/Desktop/gen/Genomic DataWarehouse Project/biodwh/startBioDWH");
        } catch (IOException ex) {
            Logger.getLogger(AdminMenu.class.getName()).log(Level.SEVERE, null, ex);
        }
}
Posted
Comments
Richard MacCutchan 22-Jan-14 12:10pm    
You forgot the .bat extension on your filename.
Member 10538510 23-Jan-14 2:50am    
i have put the .bat extension but only the command prompt is open.BioDwh does not launch.

1 solution

try
Java
Process proc = Runtime.getRuntime().exec("cmd /c start C:/Users/user/Desktop/gen/Genomic DataWarehouse Project/biodwh/startBioDWH.bat");
 
Share this answer
 
Comments
Member 10538510 23-Jan-14 2:51am    
i have put the .bat extension but only the command prompt is open.BioDwh does not launch.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900