• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't set a codeBase in my .policy file

 
Dupont Girard
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
When i run the following java code:

I get this exception:

Here is my file .policy:

But it works fine if i remove the codeBase and set the full path as follow:

Is there something wrong with the codeBase ?
Please help me !
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dupont Girard wrote:
Is there something wrong with the codeBase ?

No. The way you are specifying it is wrong.
Note: a codeBase value is a URL and thus should always utilize slashes (never backslashes) as the directory separator, even when the code source is actually on a Win32 system. Thus, if the source location for code on a Win32 system is actually C:\somepath\api\, then the policy codeBase entry should look like:

Quoted from here (emphasis mine)
 
Dupont Girard
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your quick response.
Still get the same error, here is my new code:



.policy file:
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you visit the link?
Did you notice this?
 
Dupont Girard
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried many things, but none of them works.

Here are my code as you you told me and as i read on the website:





it gives me the same exception

Many thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic