Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calling .exe file from jsp

807591May 8 2008 — edited May 8 2008
Hi,
We have a java code which executes an .exe file from the command prompt[given below].Can someone please guide us in writing the jsp code for executing an .exe file. We are trying to call the .exe file from an html page[we have already tried giving the path directly in 'href' but its not working].Thanx..

public class np {
public static void main(String[] args) {

Runtime rt = Runtime.getRuntime();
try {
rt.exec("E:/project/softwares/eclipse/eclipse.exe");
}
 catch (IOException ioe) {
ioe.printStackTrace();
}

}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 5 2008
Added on May 8 2008
5 comments
140 views