Putting a security policy file inside a JAR file

Posted on 2004-11-30
Last Modified: 2012-05-05
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;. MyClass

It doesn't seem to work. Any ideas?
Question by:fifalover
    LVL 92

    Accepted Solution

    no, the security policy file needs to be supplied seperately,
    LVL 1

    Author Comment

    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?
    LVL 92

    Expert Comment

    no sorry

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Suggested Solutions

    For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
    The viewer will learn how to implement Singleton Design Pattern in Java.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now