[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

Putting a security policy file inside a JAR file

I need to include a security policy file with my client application because it uses RMI. It won't be edited once deoployed, but I'd like to put it into the JAR file I have all the class files in. This way someone just has to copy over the one JAR file and they can use the application. Is there any way to include a security policy file inside that JAR file? I've tried doing it and then executing the code like so:

java -classpath myjar.jar;. -Djava.security.policy=policy.txt MyClass

It doesn't seem to work. Any ideas?
0
fifalover
Asked:
fifalover
  • 2
1 Solution
 
objectsCommented:
no, the security policy file needs to be supplied seperately,
0
 
fifaloverAuthor Commented:
If I can't put the policy file into the JAR file, Is there any way to put the stuff from the policy file into the code itself without having to write my own SecurityManager?
0
 
objectsCommented:
no sorry
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now