javaprintingpermissionsappletpolicyfiles

How to grant print permission to my applet without modifying java.policy file


Hi i want to grant

permission java.lang.RuntimePermission "queuePrintJob";

Permission to my java applet which runs on client machine progrmatically in java. Because i can't change the java.policy class of client.
my applet goes like

<applet name="printBarCode" code="printBarCode.TestPrinting2.class" archive="./printBarCode/printBarCode.jar" width="0" height="0"> </applet> 

Solution

  • There are basically 2 strategies you can pursue here: