Multiple policy files

Hi,
using one policy file works well like the following code.
java -Djava.security.manager -Djava.security.policy=mypolicy myprogram
But I want to use two different policy files at the same time for the same program.
I tried following, which didnt work
java -Djava.security.manager -Djava.security.policy=mypolicy1 -Djava.security.policy=mypolicy2 myprogram
Multiple policy files may be possible in security properties file. But is it possible to specify 2 policy files in command line? If yes, please give me an example.
Thank you very much for your help.
Huda

Hi,
using one policy file works well like the following code.
java -Djava.security.manager -Djava.security.policy=mypolicy myprogram
But I want to use two different policy files at the same time for the same program.
I tried following, which didnt work
java -Djava.security.manager -Djava.security.policy=mypolicy1 -Djava.security.policy=mypolicy2 myprogram
Multiple policy files may be possible in security properties file. But is it possible to specify 2 policy files in command line? If yes, please give me an example.
Thank you very much for your help.
Huda

Similar Messages

  • Loading policy files

    Two questions
    1) How do I load multiple policy files ? the flag -Djava.security.policy=policyfile seems to accept only 1 file
    2) I wish to write my own Security Manager class and want to specify in my code which policy file to load, for example Policy.loadPolicy("policyfile"); Is there such method ?
    In other words, I don't want to specify the file through the flag -Djava.security.policy=policyfile when run the program but rather specify it inside the program.
    Thanks,

    tvn wrote:
    Two questions
    1) How do I load multiple policy files ? the flag -Djava.security.policy=policyfile seems to accept only 1 fileYou can do that by adding multiple policy entries in the java.security file. See http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html#DefaultLocs
    >
    2) I wish to write my own Security Manager class and want to specify in my code which policy file to load, for example Policy.loadPolicy("policyfile"); Is there such method ?
    In other words, I don't want to specify the file through the flag -Djava.security.policy=policyfile when run the program but rather specify it inside the program. If you are using JDK 6, yes. Use the new Policy.getInstance methods, ex:
    Policy policy = Policy.getInstance("JavaPolicy", new URIParameter(new URI("file:/.../policyfile")));

  • Policytool give me error Could not find Policy File ....\.java.pol

    hi master
    error Could not find Policy File: C:\Documents and Settings\Administrator\.java.policy
    Sir when I open policytool the system give me this error
    And I use http://www.jensign.com/JavaScience/www/keystorereader/index.html this link
    For Keystore, Policy and Security File Reader
    that give me this message
    ------ Default Policy File and Keystore Status ------
    java.home C:\PROGRA~1\Java\JRE15~1.0_1
    C:\PROGRA~1\Java\JRE15~1.0_1\lib\security found.
    user.home C:\Documents and Settings\Administrator
    C:\Documents and Settings\Administrator\.java.policy NOT found.
    C:\Documents and Settings\Administrator\.keystore NOT found.
    How set user home and keystor please give me idea
    thank
    aamir

    I know this is a relatively old post, but some people can stumble on this page when doing a search for this problem.
    Anyway, I ran into this on my PC after I installed Sybase which had an older jre.
    Solution:
    1. Run regedit
    2. Look for Java Runtime Environment
    You may have to do multiple searches. Eventually you'll find one with the version number.
    3. Modify the value and change it to the correct version number. (in your case, you would have changed it from 1.4 to 1.6).
    This is much quicker than reinstalling Java every time installing something that uses an older version of Java hoses up the registry value.

  • I have tried a lot to find an app or some way in email to attach multiple of pdf files in one email. I could not find anything that sends multiple pdf file in one email and still keeping the file in simple pdf format for the recipient.

    I have tried a lot to find an app or some way in email to attach multiple of pdf files in one email. I could not find anything that sends multiple pdf file in one email and still keeping the file in simple pdf format for the recipient.

    I am not aware of a way except for photos that allows you to select multiple files in an email. I even checked settings in the Adobe Reader app, and it does not show that ability.

  • How to exreact multiple pdf files from a zip files from application server to presentation server

    Hello exprts,
    I am passing one pdf file and one text file to zip file in apllication server through my custom program and then downloading it using standard function module to my desktop. its working fine. Then I added  another pdf file to my zip file. But only single pdf file is getting download . So can you please help me regardiong this issue? 

    Dear Experts ,
    I finded out the way to extrcat pdf files in presentation server. But now my problem is that I am not able to add multiple pdf files in a zip file. When I am adding new pdf file then older one is not coming in read data set. So please kindly tell me how can I add multiple pdf file in my zip file and again I can get all the pdf files from here.

  • How to create an application-specific policy file?

    Hi Everybody:
    I'm a .NET developer with C #. I have a few applications currently running on my computer using the ODP 10.1
    Two weeks ago I installed on my computer the ODP 10.2 Release & now my previous applications have stopped working: when I try to make the connection to the database gives me this exception:
    OraOLEDB (0x80004005)
    ORA-12154: TNS: could not resolve the connect identifier specified
    In FAQ section for ODP.NET I found the next:
    Q: I have two .NET applications on the same machine running two different versions of ODP.NET. How do I ensure both these applications use the correct ODP.NET version?
    A: Beginning with ODP.NET 10.1.0.3, the Oracle installer will register the following publisher policy DLLs in the Global Assembly Cache (GAC) that redirect 9.2, 10.1 and 10.2 ODP.NET applications to use the last installed version of ODP.NET: Policy.9.2.Oracle.DataAccess.dll and Policy.10.1.Oracle.DataAccess.dll.
    ODP.NET 9.2 includes just the first policy DLL above. These policy files ensure that all your ODP.NET applications use the most recently installed version of ODP.NET.
    You may undo the redirection manually. Policy DLLs can be de-installed through gacutil.exe using the /u option. Another approach is to navigate to the GAC directory (i.e. C:\WINNT\assembly) through the Windows Explorer and delete the policy folders. That will eliminate any policy enforcement for all your ODP.NET applications.
    If you have applications on the same machine using different ODP.NET versions, you should create an application-specific policy file.
    I'm trying to do that, but I don't know what is an application-specific policy file. Someone can give me an example of How can I create and application-specific policy file???
    Regards

    Hi,
    Binding redirection is a ".net thing" as opposed to a "odp.net thing", see if this helps:
    http://msdn.microsoft.com/en-us/library/7wd6ex19(VS.71).aspx
    Hope it helps,
    Greg

  • IE running under XP can't handle multiple SWF files, Why?

    I noticed that IE 8 running under Windows XP cannot handle multiple swf files in one page.
    Up to about 10 files is no problem they are loaded and we can play them ( buttons that start a small audio file).
    But more of these files in one page will stop IE.
    Firefox ( 3.6.28) runs them fine.
    And also IE 8 and/or Firefox under Windows 7 handles them perfectly.
    Has anyone any idea what can cause this and how to resolve this?
    Thanks,
    Onno Tomson
    The Netherlands

    Sorry...I still don't get it. What is it about Windows FUS that keeps iTunes from running running the process twice? It can run many other non-Apple windows apps in multiple user sessions (commercial apps, open source apps, audio/video apps, networked apps). I can even run two different virtual machines at the same time under two different user sessions.
    Why can iTunesHelper.exe run twice but iTunes.exe cannot? Why can I run Safari at the same time? Quicktime Player runs fine under multiple user sessions.
    Blaming it on Windows and/or FUS sounds like FUD. Can anyone give a valid technical reason? Semaphores? Mutexes? An admission (and explanation) that the Windows version is purposely crippled?

  • How do you use .wsse policy file from Java Client?

    I'd like to call a WSSE enabled web service from my Java client but setup my encryption/signing requirements with a .wsse policy file.
    I know how to call a web service by programmatically setting up the security headers as described in:
    http://e-docs.bea.com/workshop/docs81/doc/en/core/index.html
    But how can I do the same thing by simply using a .wsse file?

    import java.awt.*;
    import java.applet.Applet;
    import java.awt.event.*;
    import java.net.*;
    public class links extends java.applet.Applet {
       Panel panel = new Panel();
       public links(){
          super();
          add(panel);
          Link link = new Link(this,"Answers for programmers;- ","http://forum.java.sun.com");
          panel.add(link);
       public void init(){
          setVisible(true);
       public class Link extends Label implements MouseListener {
          Applet applet;
          Color fcolor = Color.blue;
          Color lcolor = Color.pink;
          String text;
          String word;
       public Link(Applet ap, String s, String s1){
          super(s);
             this.applet = ap;
             this.text = s;
             this.word = s1;
             addMouseListener(this);
          setForeground(fcolor);
       public void paint(Graphics g){
       super.paint(g);
          if (getForeground() == lcolor){
             Dimension d = getSize();
             g.fillRect(1,d.height-5,d.width,1);
       public void update(Graphics g){paint(g);}
       public void mouseClicked(MouseEvent e){
          try{
             URL url = new URL(word);
             applet.getAppletContext().showDocument(url,"_self");
          catch(MalformedURLException er){ }
       public void mouseEntered(MouseEvent e){
          setForeground(lcolor);
          setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
          repaint();
       public void mouseExited(MouseEvent e){
          setForeground(fcolor);
          setCursor(Cursor.getDefaultCursor());
          repaint();
    public void mousePressed(MouseEvent e){}
    public void mouseReleased(MouseEvent e){}
       public static void main (String[] args){
          new links(); 
    }

  • Server.policy file

    The ejb I am developing is trying to delete the following file from a local filesystem (Linux SuSE 9.3 Pro) : /path/to/file/delete.me I get the following exception:
    java.security.AccessControlException: access denied (java.io.FilePermission /path/to/file/delete.me delete)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
    at java.security.AccessController.checkPermission(AccessController.java:427)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.lang.SecurityManager.checkDelete(SecurityManager.java:990)
    at java.io.File.delete(File.java:869)
    I tried to modify the server.policy file adding the following line:
    permission java.io.FilePermission "/path/to/file/delete.me", "delete";
    but nothing changes, even when I restart the application server (don't know even if it is necessary to restart). I am using Sun Java System Application Server Enterprise Edition 8.1. Any help is welcome...
    Thanks in advance
    null

    I think I solved the problem. At least I managed to delete the file :-)
    First I had to add the following line to JRE's java.policy file:
    permission java.io.FilePermission "/path/to/file/delete.me", "delete";Then I added the following entry to the server's server.policy file:
    grant codeBase "file:${com.sun.aas.instanceRoot}/applications/j2ee-apps/MyApp-" {
      permission java.io.FilePermission "/path/to/file/delete.me", "delete";
    };like described here:
    http://docs.sun.com/app/docs/doc/819-3659/6n5s6m58n?a=view#beabz
    I hope this could help to someone with the same problem

  • Open Multiple PDF files from Production order/Routing

    Hi Everyone
    We are in ECC 6.0 environment. We have a scenario where multiple documents were attached to single operation and also at multiple operations. But when I was trying to open these PDF documents, only the last file was getting opened and closing the previous file. How can I open multiple PDF files at one time from Production order or Routing?
    Any help is appreciated.
    Regards
    Prasad

    Hi Prasad,
    from DMS standard I regret but such a functionality is not available. In the standard originals can be opened only one after another.
    I think for realising this functionality an individual modificatoin is necessary.
    Best regards,
    Christoph

  • Multiple DB files clean migration (follow up to my decommission question)

    So I have requested help standing up a new environment and phasing out an old one since it was "all messed up" after spending some time digging into it it looks like best practice was followed (which I don't know how I missed this after reading
    through Mastering the fundamentals by Kent Agerlund multiple times). Apparently they suggest you create multiple SQL file based on how many CPU's you have available to help performance. 
    The question I have now is when the backup site task runs it only backs up 1 2GB MDF file and a 11GB LDF file. Does that make sense? It doesn't look like the other SQL files that were created are being used at all? None of the SQL files have not grown past
    the initial size (the first file started at 2GB and is still that size). 
    Assuming everything is working correctly my new plan would be to upgrade the existing setup and do a backup and restore to the new box using the same site code and server name. If I do that will it bring all those other SQL files with it our can I consolidate
    onto 1 file again? I don't think we need to worry about performance as the DB is pretty small and I'm trying to keep things simple. 
    My other choice is I have the new server built with new site code so I could add the first site as a child site and migrate things over? I have multiple DP's out there so I'm not sure best way to handle that. The plan was to blow them away and rebuild brand
    new ones for the new site, but if I can just throw an upgrade on them that should work and be less work. 

    My other choice is I have the new server built with new site code so I could add the first site as a child site and migrate things over?
    That won't work in CM12.
    Just back up the database using SQL and use that for the restore (there's no need for the SMSBackup task in CM12).
    Torsten Meringer | http://www.mssccmfaq.de

  • Read & Filter Multiple .wav files, Export Filtered SPL

    Hi
    I'm searching for tips on how to use LabVIEW to read multiple .wav files, then filter them, then export just the calculated SPL values to a "database friendly format".
    Basically I want a solution that allows me to point to several files, then press a "go button" that triggers LabVIEW to produce filtered SPL values as exported data.
    I'll skim over the cal approach since I'm confident most readers know how to handle it. Basically, though, for each 30 s .wav file of broadband noise, an associated cal tone file is used to determine the dBFS value (dB below Full Scale) to be associated with 94 dB SPL, or 114 dB SPL, as the case may be. I'll leave it at that.
    Detailed Requirements, (excluding cal steps, tho).
    1) Operates on up to a dozen 30 s time records (44,1 kSa/s, mono .wav files);
    2) Passes the signal from each desired .wav file through 18 of the 1/3 octave filters (IEC 1260 compliant, as in the S/V toolset) not necessarily in real time!;
    3) Calculates the SPL for each 1/3 octave filtered time record; This makes (12 files) x (18 filters) = 216 filtered SPL values if end-user points to a dozen broadband noise files before pressing the "Go" button;
    4) Exports SPL values in a suitable database format; an existing database does the rest of the mathematics and report generation;
    Client FileMaker database functions include:
    - import and store 1/3 octave filtered Leq(30) SPL values;
    - average filtered SPL across the declared qty of mic positions of the present test case;
    NOTES:
    1) In the field, we do NOT use simultaneous / MULTI-mics. Instead, it is absolutely an "open and shut case" that the optimum process is to move one (1) single mic quickly from spot to spot. While holding the airborne noise at a constant level we position the mic at each spot for 30 s to feed the .wav recorder, then move on. We emerge from a typical day of field activity with, say, 60 to 100 .wav files to post-process.
    2) (1), above, explains why we don't use any N.I. DAQ h/w.
    3) LabVIEW, it seems, exports best to a spreadsheet, so if needed, I'm prepared to handle manually any ugly conversion from LV's format to a proper database format ("1st Normal Form, 2nd Normal Form, etc.).
    4) Given a choice to calculate the averages in my database, versus in LV (say, to cut down on exported data qty), I'd likely opt to export the 216 SPL's and then do averaging in the database, (where the ASTM E336 reports are done).
    TIPS Gathered To Date:
    1) S/V toolset has IEC 1260 compliant filters, BUT...
    2) If you use the S/V toolset VI's, then you CANNOT ACCESS the filtered time record NOR CAN YOU WRITE the filtered data back to a .wav file! All you can do is measure the filters' outputs. Fortunately for us here, the available measures include SPL.
    Aside: Although not a show-stopper in this project, this constraint is surprising, nonetheless. To access & record the filtered sound, you'd have to either (a) ask N.I. to unprotect VI's, or (b) develop your own IEC compliant filters from N.I.'s published tap co-eff's etc.;
    3) LabVIEW does not support drag'n'drop operations on files. Instead, the recommended technique is to use multiple "Browse to/ Navigation/ File Open" panels to allow LV to open the user's desired qty of .wav files simultaneously;
    Thanks for any tips!

    The filter VI is password protected in the Sound & Vibration Toolkit (SVT) for two reasons. First, since the filter is compliant to a standard, by locking the code we guarantee that no one has the chance to accidentally change it so that they are no longer compliant. Second, the method of filtering the data is considered intellectual property that we are protecting.
    That said, from reading your post it does not appear that you need to have access to the filtered data since you are making an SPL measurement which is provided in the Sound & Vibration functionality. Is that correct?
    Also, I wanted to point you to another subVI which comes with SVT but is not in the pallette that might be of use. There is an example for SVT which is SVXMPL_Wav Power Spectrum which opens up a wav file and computes the power spectrum of it. Inside the VI, there is a subVI which will open a Wav file and convert it into a waveform which you can use with your SVT functions.
    Hope that helps,
    Jack

  • Problem fetching policy-file-request

    According to
    http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_print.html
    quote:
    * A SWF file may no longer make a socket connection to its
    own domain without a socket policy file. Prior to version
    9,0,115,0, a SWF file was permitted to make socket connections to
    ports 1024 or greater in its own domain without a policy file.
    * HTTP policy files may no longer be used to authorize
    socket connections. Prior to version 9,0,115,0, an HTTP policy
    file, served from the master location of /crossdomain.xml on port
    80, could be used to authorize a socket connection to any port 1024
    or greater on the same host.
    So with the tighter security measures, a policy file has to
    be fetched on port 843 or on the same port on which a connection is
    desired. That leads to another problem. The policy file request
    made by the player has a simple format: clear text
    <policy-file-request/> is sent as raw data bytes on
    the ports.
    As most firewalls block such raw data traffic (of unknown
    protocols) on all the ports, this means that the policy file fetch
    will fail almost always if the user is behind any firewall.
    This will render all SWFs, that do not use well known ports,
    unusable. Does anyone know what is the solution to this
    problem? Or am I missing something here?

    Common guys, someone has to know what to do here.
    I have read all that I can read and tried all that I could
    and the flash app is not accepting my policy file.

  • How can I print multiple PDF files at once using Windows 7?

    How can I print multiple PDF files at once, on an HP LJ Pro 400 xcolocr printer without opening each
    one separately using Windows 7?

    I am sorry, but to get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial printer. You can do this at http://h30499.www3.hp.com/hpeb/
    I hope this helps.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

  • How i can combine multiple pdf files in one file using a macbook air

    how i can combine multiple pdf files in one file

    The application Preview.
    Preview Help.
    Save combined PDFs
    Open the PDFs you want to combine.
    In each open PDF, choose View > Thumbnails to display the pages of the PDF in the sidebar.
    Drag the thumbnails you want to add (Command-click to select noncontiguous pages) to the thumbnail sidebar in the other PDF.You can add pages to the end of the document or between pages in a document. Drag thumbnails to reorder them. You can also add a PDF file before or after another PDF document.
    Choose File > Export to save a new PDF containing all of the combined pages, or choose File > Save to replace the original version of the destination PDF with the version containing the combined pages.

Maybe you are looking for

  • Authorising a computer that's not on line?

    How can I authorise an ordinary Windows computer to play purchased music, when that computer is not on line? Thanks, BC

  • Assign loading / handling resource to location through ABAP program

    Hello Experts, I have a requirement where by I have to assign loading / unloading resource to a location through ABAP program. Need to assign the resource in Resources Tab in TP/VS section. Is there any function module or any method available to this

  • Scrollview with buttons inside

    Hello to all, (I apologize for how I write but I am translating through a translator) my problem is to create a scrollView inside with the buttons that are used to switch from one view to another, I now implementing the scrollView with the size, for

  • Launchd to run applescript

    I have an applescript that I've written that requires user input and then it runs a shell script. I'm trying to create a launchd.plist and when I load the plist, it says it's loaded, but I don't have the dialog box on my screen, which is where the us

  • Fetch data from multiple cubes...help

    Hello, this is the very first time I post in this forum. I am using EssBase and now Smartview since about one year getting simple retrieves from cubes. One sheet for each cube I need. Now I would like to merge two sheet that are based on different cu