| Author |
Can't set a codeBase in my .policy file
|
Dupont Girard
Greenhorn
Joined: Mar 21, 2011
Posts: 24
|
|
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
Joined: Jul 26, 2007
Posts: 7602
|
|
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)
|
[Donate a pint, save a life!] [How to ask questions]
|
 |
Dupont Girard
Greenhorn
Joined: Mar 21, 2011
Posts: 24
|
|
Thank you for your quick response.
Still get the same error, here is my new code:
.policy file:
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 7602
|
|
Did you visit the link?
Did you notice this?
|
 |
Dupont Girard
Greenhorn
Joined: Mar 21, 2011
Posts: 24
|
|
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
|
 |
 |
|
|
subject: Can't set a codeBase in my .policy file
|
|
|