Go Back   Tech Support Forum > Microsoft Support > Windows XP Support

JAVA security warning - printing

This is a discussion on JAVA security warning - printing within the Windows XP Support forums, part of the Tech Support Forum category. I have an application that pops up with the message: ================================= Security warning The applet has requested access to the


Closed Thread
 
Thread Tools Search this Thread
Old 02-06-2008, 03:44 AM   #1
Registered Member
 
Join Date: Feb 2008
Posts: 5
OS: OS X



I have an application that pops up with the message:
=================================
Security warning
The applet has requested access to the printer
Do you want to allow this action?
=================================
The applet is one developed in house called FeAppletPrint.

There is a tickbox to always allow this applet to run. If I check this box and allow the applet to execute all works fine, however the next time the applet is called then the same security popup appears.

I've tried several setting in both IE and Java, all without sucess...

Is there any way that I can stop this security warning appearing?

help....

__________________
BrianJohnson is offline  
Old 02-11-2008, 11:59 AM   #2
Registered Member
 
Join Date: Feb 2008
Posts: 1
OS: WINXP



I would like an answer to the same question.

__________________
jjobin is offline  
Old 02-12-2008, 03:46 AM   #3
Registered Member
 
Join Date: Feb 2008
Posts: 5
OS: OS X



One of our technical guys came-up with the following:
I only have one version of java installed – jre.1.5.0 – so go into the folder of whichever version of java you’re running then into the lib\security folder:

C:\program files\Java\jre.1.5.0\lib\security

There should be a file called java.policy. Open this in notepad and add the line:

permission java.lang.RuntimePermission "queuePrintJob";

to the

grant {

};

section. Mine went from looking like:

// Standard extensions get all permissions by default

grant codeBase "file:${{java.ext.dirs}}/*" {

permission java.security.AllPermission;

};

// default permissions granted to all domains

grant {

// Allows any thread to stop itself using the java.lang.Thread.stop()
// method that takes no argument.
// Note that this permission is granted by default only to remain
// backwards compatible.
// It is strongly recommended that you either remove this permission
// from this policy file or further restrict it to code sources
// that you specify, because Thread.stop() is potentially unsafe.
// See "http://java.sun.com/notes" for more information.
permission java.lang.RuntimePermission "stopThread";

// allows anyone to listen on un-privileged ports
permission java.net.SocketPermission "localhost:1024-", "listen";

// "standard" properies that can be read by anyone

permission java.util.PropertyPermission "java.version", "read";

permission java.util.PropertyPermission "java.vendor", "read";

permission java.util.PropertyPermission "java.vendor.url", "read";

permission java.util.PropertyPermission "java.class.version", "read";

permission java.util.PropertyPermission "os.name", "read";

permission java.util.PropertyPermission "os.version", "read";

permission java.util.PropertyPermission "os.arch", "read";

permission java.util.PropertyPermission "file.separator", "read";

permission java.util.PropertyPermission "path.separator", "read";

permission java.util.PropertyPermission "line.separator", "read";



permission java.util.PropertyPermission "java.specification.version", "read";

permission java.util.PropertyPermission "java.specification.vendor", "read";

permission java.util.PropertyPermission "java.specification.name", "read";



permission java.util.PropertyPermission "java.vm.specification.version", "read";

permission java.util.PropertyPermission "java.vm.specification.vendor", "read";

permission java.util.PropertyPermission "java.vm.specification.name", "read";

permission java.util.PropertyPermission "java.vm.version", "read";

permission java.util.PropertyPermission "java.vm.vendor", "read";

permission java.util.PropertyPermission "java.vm.name", "read";

};



to:



// Standard extensions get all permissions by default



grant codeBase "file:${{java.ext.dirs}}/*" {

permission java.security.AllPermission;

};



// default permissions granted to all domains



grant {

// Allows any thread to stop itself using the java.lang.Thread.stop()

// method that takes no argument.

// Note that this permission is granted by default only to remain

// backwards compatible.

// It is strongly recommended that you either remove this permission

// from this policy file or further restrict it to code sources

// that you specify, because Thread.stop() is potentially unsafe.

// See "http://java.sun.com/notes" for more information.

permission java.lang.RuntimePermission "stopThread";



// allows anyone to listen on un-privileged ports

permission java.net.SocketPermission "localhost:1024-", "listen";



// "standard" properies that can be read by anyone



permission java.util.PropertyPermission "java.version", "read";

permission java.util.PropertyPermission "java.vendor", "read";

permission java.util.PropertyPermission "java.vendor.url", "read";

permission java.util.PropertyPermission "java.class.version", "read";

permission java.util.PropertyPermission "os.name", "read";

permission java.util.PropertyPermission "os.version", "read";

permission java.util.PropertyPermission "os.arch", "read";

permission java.util.PropertyPermission "file.separator", "read";

permission java.util.PropertyPermission "path.separator", "read";

permission java.util.PropertyPermission "line.separator", "read";



permission java.util.PropertyPermission "java.specification.version", "read";

permission java.util.PropertyPermission "java.specification.vendor", "read";

permission java.util.PropertyPermission "java.specification.name", "read";



permission java.util.PropertyPermission "java.vm.specification.version", "read";

permission java.util.PropertyPermission "java.vm.specification.vendor", "read";

permission java.util.PropertyPermission "java.vm.specification.name", "read";

permission java.util.PropertyPermission "java.vm.version", "read";

permission java.util.PropertyPermission "java.vm.vendor", "read";

permission java.util.PropertyPermission "java.vm.name", "read";

permission java.lang.RuntimePermission "queuePrintJob";

};





Save this file then reload web rio and it should be ok.[/SIZE]
__________________
BrianJohnson is offline  
Old 07-09-2008, 09:07 AM   #4
Registered Member
 
Join Date: Jul 2008
Posts: 1
OS: Windows XP sp2



Confirm that this fixed the problem.

Thanks!
__________________
tokn is offline  
Old 12-09-2009, 05:54 AM   #5
Registered Member
 
Join Date: Dec 2009
Posts: 1
OS: xp sp2



Hello! I had the same problem, resolved with the change in the java.policy file that BrianJohnson wrote, but... I have always an exception after try:

docPrintJob.print(doc, null);

The exception:
Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at sun.print.Win32PrintJob.initializeAttributeSets(Unknown Source)
at sun.print.Win32PrintJob.print(Unknown Source)
at ImprimirPruebas.paint(ImprimirPruebas.java:95)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

I suposse that it's about a permissions problem, but I'm not be able to find the solution. Any help? Thanks in advance.

__________________
arturoterron is offline  
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2


All times are GMT -7. The time now is 08:47 PM.


Copyright 2001 - 2014, Tech Support Forum

Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts