Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing a EXE from an Applet

Status
Not open for further replies.

guber

Programmer
Jan 4, 2002
27
US
I tested this program... and they worked fine... but I need to do this in an applet. Someone can help me ???



import java.lang.System;
import java.lang.Runtime;
import java.io.IOException;

public class loadNotepad {
public static void main(String args[]) throws IOException {
Runtime r = Runtime.getRuntime();
Process p = null;
try {
p = r.exec("C:\\winnt\\notepad.exe");
}
catch (Exception e) { }
}
}




Thanks !!
 
If you want the Applet to run from a Browser you will have to Sign it to get the security level to execute code on the users machine.

-pete

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top