Random Java Security stuff

Ubernaut.net 

Working With Applets:

    a link to the source: SchroederReadApplet.java

    First create the directory "C:\schroeder\"

    1). download the following text file to be read: schroederread.txt

    2) enter this line in "C:\Program Files\Java\jre1.6.0\lib\security\java.security" after the "policy.url.2" line:

         policy.url.3=file:/C:/schroeder/schroederpolicy 

    3) download this policy file to C:\schroeder : schroederpolicy 

    4)  reload your browser and try running the applet located at this page: schroederread.html 

Working With Applications

     1) here is a link to the app's source: SchroederReadApplicationWithSM.java 

     2) here is a link to the app's classfile: SchroederReadApplicationWithSM.class

    3) from "C:\schroeder" run the following command: "java SchroederReadApplicationWithSM"

        It will work because the applet's policyFile sets the correct permissions.

 Working With The Command Prompt

        to find the location you should change your policy file:

             type "$JAVA_HOME" 

         Here's a link to my reading app w/o a SM : SchroederReadApplication.java 

         to set this program to run with the previous policy file type:

                 java -Djava.security.manager 

                            -Djava.security.policy=file:/C:/schroeder/schroederpolicy 

                                          SchroederReadApplication        

         to set this program to run with a SM type:

                      java -Djava.security.manager <SchroederReadApplication>


        to run the program type:


                      java SchroederReadApplication