• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

applet security problem

 
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
 
Bartender
Posts: 9615
16
Mac OS X Linux 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: 9615
16
Mac OS X Linux 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
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic