#! /bin/bash # # Compile and run the PTest program java -version policyFile=PTest.policy curDir=`pwd` cd .. jarFile=`pwd`/PTest.jar cd $curDir echo Compile the test and jar it up... javac PTest.java jar cf $jarFile PTest*.class echo Run the test in setup mode, creating a subdirectory and policy file... java -cp $jarFile PTest $curDir $jarFile $policyFile echo Policy file is... cat $policyFile echo Now run the experiment under a security manager... java -cp $jarFile -Djava.security.manager -Djava.security.policy=$policyFile PTest $curDir