

We’ve had this annoying problem when printing from an applet from our web based HIS software. The applet security window pops up (we’re using Firefox) with the prompt, “The applet has requested access to the printer. Do you want to allow this action?“ It also has a check box for “always allowing this applet to access the printer” . This however is never remembered and the same prompt is presented every time the applet runs which takes either two clicks of the mouse or two keystrokes (spacebar and enter) to dismiss. This is highly annoying as it is used for displaying/printing the bill which happens roughly once or twice every minute. The right way to go would be to sign the applet. Here is a link to Sun’s (Now Oracle) online resource. As usual our developers took a shortcut. This might however help others who have similar problems but cannot sign the applet for various reasons.

The annoying java security window.
Change over to the security folder of your JRE installtion -default is C:\Program Files\Java\jre6\lib\security
Next, open the file java.policy for editing in Wordpad (Do not use Notepad). Scroll to the end of the file.

This is how the end of the file should look after modificaton.
Press enter after the semicolon on the line just above the }; and properly indent and type in the following line…
permission java.lang.RuntimePermission “queuePrintJob”;
Restart your computer and you are done! This was tested on Windows XP Profession SP3.
The java.policy file in Ubuntu 10.04 is found in the /etc/java-6-sun/security folder. The same change as for Windows (Shown in the above screenshot) needs to be done.
In a Terminal window, type the following command (The Terminal is found in the Applications > Accessories > Terminal menu)
sudo nano /etc/java-6-sun/security/java.policy
Insert the line, permission java.lang.RuntimePermission “queuePrintJob”; just above the closing }; (Refer to the above screenshot)
Press Ctrl + X and save and exit
If you would like to make a comment, please fill out the form below.