• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SecurityException in my Applet

 
Lucas Germano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I run my Applet in a simple HTML page, occurs the following error

SecurityException: Trusted loader attempted to load sandboxed resource from file : C:/Users/lucas/teste.jar


I follow the tutorial but in the step 7, i got the following error

Could not open file policy C:\Program Files\Java\jdk1.7.0_05\bin\raystore: sun.security.provider.PolicyParser$ParsingException line 1: expected [;] found[pípí]

Maybe I'm doing something wrong in the step 7, because I don't understand what to do in step 7
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the contents of the policy file.
 
Lucas Germano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand so much about Java, so I have some difficult with that. How can I show you the content of a policy ?

I don't know what to do in policytool

How can I do ? What i have to do ins this step 7 ?

I just want to put my Applet to run in my Web Application, but occurs the SecurityException
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a file, and its contents are apparently causing a problem: C:\Program Files\Java\jdk1.7.0_05\bin\raystore

If we knew what's in the file, we might be able to help.
 
Lucas Germano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But how can I put the content of this file ?

When I open the file with Notepad++ or notepad, Just open some special caracter
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, that's a problem, then. Your JVM is apparently set up to expect a security policy in that file; if there's anything else in it, that's a problem. Was that file altered at all? What's the last modified date on it?
 
Lucas Germano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, when I put the <APPLET> tag in my web application, I receive the SecurityException, and then, I was instruct to follow this tutorial, but in the step 7, I don't know what to do, I'm trying to open the file that was created in this tutorial through the policytool.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was that file altered at all? What's the last modified date on it?
 
Lucas Germano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Last update 2012-07-16 16:15
 
Lucas Germano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I got the ExceptionInInitualizerError,

When I try to run my html with the applet, I got a alert warning telling that
Java found some app components that is a security problem. Block this execution ?
I put no.

And after that occurs ExceptionInInitualizerError

In localhost (without HTML), works fine,
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is a very recent timestamp; seems like you changed something (maybe inadvertently) that confuses the policy file system.

The parsing exception goes along with the ExceptionInInitualizerError? Or is that a different problem?
 
Lucas Germano
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a different exception, that occurs when I put to ignore the SecurityException.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic