[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: java.policy ?
Michael,
When you changed the name, did you use forward slashes (recommended) or at
least double back slashes? The back slash is an escape character. So many
times when you specify file names on windows using the back slash, you have
problems. I normally recommend the use of forward slashes.
All this being said, the "java.home" property is a standard Java system
property which holds the installation directory for the current JVM. Java
should figure this out on its own even under Windows. So, you should be able
to leave "${java.home}" and have it appropriately populated. You can print out
its contents on your Windows System with the following:
System.out.println("Java home: "+System.getProperty("java.home");
Cindy
"D. Michael Nelson" wrote:
> Hello,
>
> I have created a custom Permission class. My application works fine with my
> explicitly named policy file when using the java -D command line option, but
> I am trying to get it to work with the standard system file
> C:\jdk1.3\jre\lib\security\java.policy.
>
> Here is what I have done:
>
> I modified the java.policy to include the required Permissions for my app (I
> tested the modification to ensure that it works using the java -D command
> line option).
>
> The C:\jdk1.3\jre\lib\security\java.security configuration file lists the
> location as follow:
>
> # The default is to have a single system-wide policy file,
> # and a policy file in the user's home directory.
> policy.url.1=file:${java.home}/lib/security/java.policy
> policy.url.2=file:${user.home}/.java.policy
>
> However, the java.policy is located in the C:\jdk1.3\jre\lib\security\. So,
> I modified the java.security configuration to reflect the location of
> java.policy file.
>
> Is necessary to have the java.policy located in ${user.home}? If yes, what
> is the value of this system variable in W2K environment?
>
> Then I ran my application using just "java AppName". This of course did not
> work. Any suggestions.
>
> Thanks in advance,
> Michael N.