File Access with unsigned Applet through editing the java.policy file

I'am starting to lose my hair on this...
I am trying to get an applet to run so that it can access the file system to move files on my local maschin. Because this applet is only running on my VM i can change the java.policy to avoid the signing of the applet.
first of all, if i wrote in the java.policy file
grant {
  permission java.security.AllPermission; 
};everything is working perfekt.
But I have not the intention to open the gates for any applet out there, so i want to limit the access to my applet. With every of the following versions I get at best an
java.security.AccessControlException: access denied (java.io.FilePermission...
My Setup
My Java Version: jre1.6.0_02
My applet is located unter the url
http://admin.mydomain.com/applet.jar
In Html i tryed the following different versions of loading the applet - none worked
<applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
<applet codebase="http://admin.mydomain.com" name="shortcut" code="start.class" archive="applet.jar" width="0" height="0"></applet>
<applet name="shortcut" code="start.class" archive="http://admin.mydomain.com/applet.jar" width="0" height="0"></applet>in java.policy i tryed following versions with every html applet load version
grant codeBase "http://admin.x-press.de/-" {
  permission java.security.AllPermission; 
grant codeBase "http://admin.x-press.de/+" {
  permission java.security.AllPermission; 
grant codeBase "http://admin.x-press.de/applet.jar" {
  permission java.security.AllPermission; 
};why is it with
grant {
  permission java.security.AllPermission; 
};working, and not with the other versions?
i am almost bold now, please try to save my last hair from falling down.
any suggestion would be nice
thanks, feyyaz
Message was edited by:
feyyazdogu

I read the mentioned documentation and your right, some of my versions were wrong, but after reading the doumentation again i came to following result which should had worked but didn't.
java.policy
grant codeBase "http://admin.mydomain.com/*" {
  permission java.security.AllPermission;
HTML File
<applet codebase="http://admin.mydomain.com/" name="shortcut" code="start.class" archive="applet.jar" height="0" width="0"></applet>if I am entering http://admin.mydomain.com/applet.jar i can download the jar, so the archive lays in the correct directory.
what i am doing wrong? do i have to change an additional file somewhere else?

Similar Messages

  • How to handle the java.policy file ?

    Can somebody tell me how to handle the java.policy file?
    I always get java.net.SocketExceptions and java.security.AccessControlExceptions while connecting to an appserver from an applet.
    What do I have to write in the java.policy file, where do I have to place it and do I have to call it in some way form my applet?
    Thanks in advance.
    don call

    The java.policy file goes in your jre installation directory in .../jre/lib/security (there should be one there already).
    I used it to allow otherwise restricted permissions for an applet using javax.comm. Add something like the following to the file:
    grant codeBase "URL:http://yourDomainName/rootDirectoryOfYourApp/*" {
         permission java.security.AllPermission;
    This will give the applet downloaded from your site all permissions. You might want to give only certain permissions, I don't know.
    Teri

  • Have file name with date working but appending the time to file name can't get a result

    DECLARE @dt AS VARCHAR(26)
    SELECT @dt = REPLACE(CONVERT(VARCHAR(26),getDate(),110),'-','-'
    Have this appended to a filename like: log_01-15-2015.  Don't know what to add to SQL code to get the get the time and append time in hours, min, sec. like:  log_01-15-2015_10:01:33  
    DECLARE @dt AS VARCHAR(50)
    SELECT @dt = REPLACE(CONVERT(VARCHAR,CURRENT_TIMESTAMP,110),'-','-') +'_'+ CONVERT(VARCHAR,CURRENT_TIMESTAMP,108)
    EXEC master.dbo.sp_configure 'show advanced options',1
    RECONFIGURE WITH OVERRIDE
    EXEC master.dbo.sp_configure 'xp_cmdshell',1
    RECONFIGURE WITH OVERRIDE
    SET @bcpCommand = 'bcp "SELECT * FROM ##Temp ORDER BY barcode" queryout "C:\TEMP\Log\ContainerHistory_Log_' + @dt +'" -c -T'
    EXEC master..xp_cmdshell @bcpCommand
    I am trying to append to the file created with the date a time stamp but when appending the time part for the filename results aren't creating the file.  If it's just doing the date part then it is working. Any idea what is wrong? 

    Since you added ":" to the file name, the file name is not valid. You can change ":" to "-".
    DECLARE @dt AS VARCHAR(50)
    SELECT @dt = CONVERT(VARCHAR,CURRENT_TIMESTAMP,110) +'_'+ REPLACE(CONVERT(VARCHAR,CURRENT_TIMESTAMP,108), ':', '-')
    SELECT @dt
    A Fan of SSIS, SSRS and SSAS

  • How do I edit the wording in file or add to wording in file or Doc.

    Hoe di I edit wording in a file or doc.

    Thanks but I can edit in word without Adobe defeats the purpose.
           From: Sara.Forsberg <[email protected]>
    To: Samuel Iglecias <[email protected]>
    Sent: Monday, February 23, 2015 12:43 PM
    Subject:  how do I edit the wording in file or add to wording in file or Doc.
    how do I edit the wording in file or add to wording in file or Doc.
    created by Sara.Forsberg in Adobe Acrobat.com Services - View the full discussionHi samueli11326032, Do you have  PDF file or a Word document (.doc or .docx file) that you're trying to edit? To edit a PDF, you need to use Acrobat. If you have Word doc that you converted from PDF, you can download the file from your account at https://cloud.acrobat.com, so that you can open it and edit it in Microsoft Word. If you've made that far and are having trouble selecting/editing the text in Word, try triple-clicking in the text block that you want to edit. And, if I've completely misunderstood your question, let me know a bit more about the file that you're trying to edit it, and what software you're using, and I'll do what I can to get the issue resolved. Best,Sara If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7222389#7222389 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7222389#7222389 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Adobe Acrobat.com Services by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Java.policy file  - Must I change it?

    I just got a certificate from Verisign with which I signed my applet. It works fine and now I want to distribute it to a group of users.
    Back when I was developing the applet with a self-signed cert, I changed the java.policy file to allow the applet to do things 'outside the sandbox'.
    I thought, perhaps mistakenly, that when I got the Verisign ceritifcate I would not need to concern myself with java.policy in any way. But now, even with the Verisign cert, my applet won't run correctly w/o the updated policy file.
    This is only important to me as I do not want to go around to 'x' number of user workstations and modify each java.policy file.
    Am I missing something??
    thanks

    You mention
    "you should be able to remove the policy file and users can just accept the certificate "
    I experience the same, remove all policy files, signed applets can then access resopurces on the local machine. However, practically all the documentation I read regarding JAVA 2 (I'm using 1.4.1_02) says you must have a policy file when using a signed applet. At least they say sign your applet and then indicate what the policy file should look like to grant specific permissions for that applet. I find no policy file will still allow a signed applet to access local files... Is this a bug in JAVA 2 1.4.1_02, or the correct behavior. thanks in advance.

  • .java.policy file problem

    Is there someone who knows how to reinitialise the java policy file at runtime?
    My signed applet writes a policy file to the users home directory, but that file is only used after closing the browser and surfing back to our page. It should immediatly use that new file.
    Someone who got some experience with that...?
    Regards

    And is it true that if you use a Thawte or verisign certificate, you will not have to change the .java.policy file?

  • ".java.policy" file where is this located

    Hi,
    Where is the .java.policy file located. Do I have to create it? Do I have to use any editor for this? Please help me.
    Thank you,
    Regards
    Uma

    It'll probably be in the lib/security directory of your JRE.
    If you've got a JDK then it'll be something like jdk1.3/jre/lib/security/java.policy

  • Where to put java.policy file?

    Under which directory the "java.policy" file must be kept in?

    Hi!
    The policy file must be indicated in the command line or by system property, when you starts the service, like the following: -Djava.security.policy = yourfile.policy. If you want to indicate another directory, you can do like this: -Djava.security.policy = C:\temp\yourfile.policy.
    I hope it helps you,
    Sandra.

  • How open and edit the coherence.xml file?

    How can I open and edit the coherence.xml file?
    I cannot find the coherence.xml file in the coherence.jar package.
    Thank you,
    June

    If you are intent on changing the coherence.xml file, then you could use the JAR command (that comes with Java) to extract the coherence.xml file from coherence.jar and the later repackage the coherence.jar file using the udpated coherence.xml file, e.g.:
    C:\java\opt\coherence-331\lib>jar -xvf coherence.jar tangosol-coherence.xmlextracted: tangosol-coherence.xml>
    Instead of using JAR, on Windows you can associate the .JAR, .WAR and .EAR extensions with WinZip and use it to access / modify the contents of JAR files.
    However, the suggested approach is as follows, and does not include any changes to the tangosol.jar file:
    The tangosol-coherence-override-dev.xml file can be found in the coherence.jar file. After editing this file (in this case to define a unique value for the port system-property value for the multicast listener), save the file and add it to the server's classpath. When the server is executed, the values in the tangosol-coherence-override-dev.xml file will override any corresponding settings in the tangosol-coherence.xml file.Peace,
    Cameron Purdy | Oracle Coherence

  • The type tool has a circle with a strike through on the bottom corner and won't insert words when iI type

    I've just restored from a computer crash and re installed Creative Cloud 6 on my clean computer.  Since then I've tried to use illustrator but can't get the type tool to function.  It appears but has a small circle with a strike through on the bottom right corner and won't insert words when I type.  I'm a newbie to illustrator and other Adobe products so please be gentle.  Thanks for any help.

    Thanks for your suggestion. 
    This was a bigger problem than I thought so I contacted support. The type issue was fixed in the repair.
    BTW I am running Creative Cloud 2014 and not cc6 like I thought.  Also on PC Windows 7
    Here is the result:
    I also have had a difficult time with Adobe Illustrator CC 2014 crashing upon launch.  The support staff was great even though we had to work through several sessions.  Below is the email explaining our final session.
    This email is in regards with the issue you had been facing with Illustrator CC 2014.
    While going through the installer logs, we found that there was an issue with the installation & the program installer had been denied access to several critical files & folders during installation.
    This was the main reason for Illustrator crash as several critical components had not been installed properly.
    We tried installing the program in a new user account & that worked.
    Though the program has been installed properly now & is working in your old account, I will still strongly recommend you to get your computer user account repaired with a Windows 7 operating system diskette.
    This is required so that you do not run into more trouble later while working with the Adobe Applications or even while installing other programs.
    Avanish Divya was the final support person that successfully resolved my problems.
    I hope this helps other panicked users. 

  • HT5177 How can two people edit the same FCPX file? One company, so both people/computers share the same license. Example: I work on revision A and my boss takes it and makes revision B and gives it back to me using two separate computers.

    How can two people edit the same FCPX file? One company, so both people/computers share the same license. Example: I work on revision A and my boss takes it and makes revision B and gives it back to me using two separate computers.

    Have the project, events and media on one drive which is common to both macs.
    You can download FCP X to both macs using the same Apple ID that it was purchased with.
    Andy

  • How do yo turn a pdf file into reader so i can edit the form?

    how do yo turn a pdf file into reader so i can edit the form?

    I have no idea what you are trying to say; your are trying to open a PDF with Reader?

  • How to edit the web.xml file

    hi friends,
    i have been working with netbeans for webapplications so far therefore its not ever been requerd to edit the web.xml file that automatically done by IDE itself.
    now, i am just trying to deploy the servlet and jsp's externally without using any tool and i found a requrement to map the servlet and jsp in web.xml file. when i try to edit inside this file it seems noneditable, nothing gonna change. i have an alternate to do this is firstly copy the content of this file into txt file and after making the requred changes overwrite this file in .xml formate to orignal web.xml file.
    am i going in right way?? please help me
    regards
    san

    open it in a text editor and modify it.
    %

  • MacBook Air will not reboot. A file folder with a question mark in the center of it appears. What is the problem?

    MacBook Air will not power on or reboot. A file folder with a question mark in the center of it appears. What is the problem?

    Go step by step and test.
    http://support.apple.com/kb/ts1440
    Startup Manager to select Startup disk.
    http://support.apple.com/kb/HT1310
    Repair Disk
    Steps 2 through 8
    http://support.apple.com/kb/PH5836
    Reset PRAM.
    http://support.apple.com/kb/PH4405
    Reinstall OS X
    If this does not help, contact Apple.
    Best.

  • How do I show the bookmarks toolbar while in fullscreen on Firefox 20? In older versions you could edit the userChrome.css file. Does that still exist?

    After searching for this option, it appears it was very easy to do in older versions of firefox on windows 7. Many posts say you can edit the userChrome.css file to add:
    #PersonalToolbar[moz-collapsed="true"] {
    visibility: visible !important;
    However, on 2 machines with firefox 20, I've searched for that file and cannot find it. Does it even exist any more? if not, how can I set firefox to go to fullscreen mode and continue to show the bookmarks toolbar? Unchecking hide toolbars does not work for the bookmarks toolbar.

    userChrome.css does not exist by default. You can create it; it's an ordinary text file. Note that you do need a namespace at the beginning of the file.
    You could try this:
    @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
    #PersonalToolbar[moz-collapsed="true"]{
    visibility: visible !important;
    #navigator-toolbox[inFullscreen="true"]{
    margin-top:-62px !important;
    I added the second rule to prevents the toolbar area from rolling all the way up. The specific value may need to be adjusted by a few pixels depending on your toolbar heights.

Maybe you are looking for

  • Apps shutting down when I try to print

    Installed 10.4.11 about 2 weeks ago. All seemed to be fine. Suddenly, whenever I try to print, from any app (text edit, Word, Preview, etc), I get a few seconds of the spinning ball, and then the app crashes with a 'shut down unexpectedly' message. I

  • Can someone give me, in simple terms, the steps to Export a PDF to Word?

    I have spent hours on the phone with Adobe. I am technically challenged. When I used to pull up a PDF, I could use Tools to do this. It now asks me to login and when I do it says there was an error. When I retry, I get nothing..the submit button neve

  • Raid building tip - Turn off Windows "Automatic update"

    If you are running Windows and are in the software configuration setup stage of  creating your raid, make sure you have windows update NOT set to automatic. Otherwise during your long raid building stage (in my case it took almost an entire day when

  • Solution for printing

    I have lost my cd of HP Deskjet F4288 how i can install the printer to my computer  software windows xp

  • HT4623 After upgrading to 6.1 the bluetooth will not pair.

    I reset the iphone 5 because the weather was not updating. It erased the previous bluetooth pairings and now it gives an pairing unsuccesful on the Jabra and the Bose headset. When I tried to back up the iphone to the MacBook, it also gave me an erro