Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet security problem

 
mohan dodderi
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi , i am trying to execute a new process in Applet but it is showing the following error.

exception:java.security.AccessControlException:access denied(java.io.FilePermission c:/Program execute).

but i also tried with signin (i used keytool & jarsigner )
but still showing the same error.

and i have written the following code


public class OpenEKG extends Applet
{

public void init()
{



}
public void start()
{

try
{

Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("C:/Program Files/Internet Explorer/IEXPLORE.exe -k "+" http://localhost:8080/jsftest1/servlet/myservlet");

}
catch(IOException ioe)
{

}
}

}


if any of u know the sol pls help me.
thanks & regards
mohan dodderi
 
Joe Ess
Bartender
Posts: 9340
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Giving you the benefit of the doubt in getting applet signing right, I'll bet the error you get with the signed applet is slightly different. If you look at the error you received:

java.io.FilePermission c:/Program execute

You can see that the command shell is considering the command to end with the first space. Since there's no command called "c:/Program", you'd get an error.
Don't forget to purge your browser's cache and remove all instances of the class file from the class path so an unsigned copy doesn't get picked up.
If all else fails, try working through the Signed Applet chapter of Advanced Programming for the Java 2 Platform. There may be a step in the process that you've missed.
 
mohan dodderi
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, Joe Ess .thanks for ur replai, but still i am getting the same error.here problem is not with path i.e c:/program execute. i think problem is with applet security. pls help me to solve this problem.

thanks & regards
mohan dodderi
 
Joe Ess
Bartender
Posts: 9340
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try going through the tutorial I pointed you to?
And you will need to change that path. cmd does not like spaces in the path. You can either convert it to 8.3 notation (i.e. "progra~1" for "Program Files") or put quotes around the path.
 
mohan dodderi
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Joe Ess .for ur invaluable guidelines.
now my signed applet is working .but it works only on stand alone system.
if i try to open from some other systems through net it is throwing java.security.AccessControlException acess denied. pls help me how to overcome from this problem.

thanks & regards
mohandodderi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic