For Programmers: Free Programming Magazines  


Home > Archive > Java Security > April 2004 > JRE 1.4 Policy File









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author JRE 1.4 Policy File
Jason Price

2004-04-20, 12:49 pm

I've been looking everywhere but can't find a solution to this:

I have an applet that prints to a barcode printer. Unfortunately as
this applet is served from a silverstream (ver 3.7.5) server I can't
just use a jar file and sign it (because silverstream just will not
server the jar file correctly). The applet will run on an intranet
only but I can only get it to work but setting the ploicy file to
AllPermissions. I am a bit loath to do this and would much prefer
just to set Printing permisions in the policy file. Does anyone have
any idea what permissions i would need? or indeed if it is possible?
i am running JRE 1.4.2_04 on the clients.
Roedy Green

2004-04-20, 8:33 pm

On 20 Apr 2004 08:40:34 -0700, jason.price@novatech.co.uk (Jason
Price) wrote or quoted :

>Does anyone have
>any idea what permissions i would need?


Sun has a giant list of all permissions you can comb. See the link
at http://mindprod.com/jgloss/policyfile.html

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Jason Price

2004-04-21, 5:50 am

> Sun has a giant list of all permissions you can comb. See the link
> at http://mindprod.com/jgloss/policyfile.html


I've looked through these docs but there is no mention of the
permissions needed for any class in the Javax.print package. Its not
a major problem (as its my applet running on my intranet), its just I
may need to do this for our web site at some point in the future and
thought i'd try and figure it out before hand.

Thanks for you reply.
Roedy Green

2004-04-21, 7:32 am

On 21 Apr 2004 01:22:47 -0700, jason.price@novatech.co.uk (Jason
Price) wrote or quoted :

>I've looked through these docs but there is no mention of the
>permissions needed for any class in the Javax.print package.


Are you getting an exception that mentions a failed permission?

Is the problem in the URL area?

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Jason Price

2004-04-22, 10:35 am

> Are you getting an exception that mentions a failed permission?
>
> Is the problem in the URL area?


I don't get any exceptions. The java plugin throws up an alert saying
this applet is trying to print do you want to allowit? with Yes/No
buttons. If you click yes the applet carries on executing but
PrintServiceLookup.lookupPrintServices(null, null) always returns a
zero length array. If I set a policy file with AllPermissions then it
all works as it should. As you say it may be somthing to do with url
or maybe sockets as the javax.print package is IP compatible. I don't
have the time to do any testing this w but I'll post anything I
find when I can run some tests.

cheers
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com