Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy java.policy

I have written some Java Applets and bundled them into a signed JAR. Even though the Applets are signed, they still need to be some changes on the client concerning the java.policy file. For example, to do a print job.

To help the end user, the user can download another JAR with a small Swing app which will add the entries to their .java.policy.

My questions:

Is there a well known library to deploy/deliver/install java.policy?

The small application will simply append to the .java.policy. If run several time, the program will append the same data several times. It would be better if I only add the entry once. For that I have to parse the .java.policy and write back. Is there any library to manipulate java.policy entries?

like image 919
PeterMmm Avatar asked Nov 23 '10 18:11

PeterMmm


People also ask

How is Java code deployed?

To deploy your Java Web Start application, first compile the source code, package it as a JAR file, and sign the JAR file. Java Web Start applications are launched by using the Java Network Launch Protocol (JNLP).

What is Java deployment rule set?

The Deployment Rule Set feature enables an enterprise to create rules so that specific applications or groups of applications will be run, blocked, or subject to Java's default behavior. Applications that match a run rule will be run without security prompts.

What is Java policy?

The java. policy file installed with the JDK grants all permissions to standard extensions, allows anyone to listen on un-privileged ports, and allows any code to read certain "standard" properties that are not security-sensitive, such as the " os.name " and " file. separator " properties.

Where is Java policy located?

The java. policy file that is supplied by WebSphere Application Server is located at install_root/java/jre/lib/security/java. policy.


1 Answers

Java's Policy Tool lets you manipulate existing policy file (and even create new ones). But it's mostly geared towards developers. If you want to make it more user-friendly, I imagine you would have to write one yourself (you should be able to reuse a lot of the code from the standard policy tool).

like image 191
Vivin Paliath Avatar answered Sep 18 '22 13:09

Vivin Paliath