Accessing .exe files from applet
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jegadeeswari_R
Posted On:   Thursday, February 9, 2006 07:35 AM

I am trying to execute notepad.exe from applet code.While running applet,appletviewer is opened(which shows applet started msg in status bar)but notepad can't be opened.My appletcode is shown in below. public void start() { try { Runtime r = Runtime.getRuntime(); Process p = null; p = r.exec(new String[]{"C:\WINDOWS\NOTEPAD.exe"}); }catch(Exception e){} } What i made mistake in above code.or anyother way to call .exe files from applet. Thanks&Regards Jegadeeswari R.    More>>



I am trying to execute notepad.exe from applet code.While running applet,appletviewer is opened(which shows applet started msg in status bar)but notepad can't be opened.My appletcode is shown in below.

public void start()
{
try
{
Runtime r = Runtime.getRuntime();
Process p = null;
p = r.exec(new String[]{"C:\WINDOWS\NOTEPAD.exe"});
}catch(Exception e){}
}



What i made mistake in above code.or anyother way to call .exe files from applet.

Thanks&Regards
Jegadeeswari R.


   <<Less

Re: Accessing .exe files from applet

Posted By:   WarnerJan_Veldhuis  
Posted On:   Thursday, February 9, 2006 07:46 AM

Due to the security model in which applets are run, you cannot start processes on the clients computer: r.exec( "format c:") explains why :)
About | Sitemap | Contact