Can a JApplet access a file to be read?

I think I recall reading or hearing somewhere that a JApplet cannot, for "security reasons", access any files on the computer it is running on unless it is the 'original' or the one where the code is stored. What I would like to do is have a file that will be only read (not written to) by a JApplet and use the information for the applet. If I always run the JApplet with a browser on the computer where I have the code stored, will it allow me to access this file or will it still prevent me? Or can I just have the file stored in the same folder as the applet in my webpage directory so that it will be able to access it there and display it for all others on different computers?
Thanks in advance for any insights!

Hello forum,
Lot of confusion's on this topic.
Here is my understanding.The question is "Can a JApplet access a file to be read?". Answer is "No". But workaround is there.Then where the confusion is.
I have seen kartik181 mentioned about using digital signature from verisign/similar to grant access to your local file system!
The question asked by aachi is " ........Is it so? What is the purpose of digital signatures then?"
Also aachi mentioned about policy file. That means to get an access to local file is something you have to do with policy file.
bharthy explained the same in detail with some example.
Now look at the original question posted by the author littleB.
The answer I got from jdk 1.2 sand box model..
"There is no longer a built-in concept that all local code is trusted. Instead, local code (e.g., non-system code, application packages installed on the local file system) is subjected to the same security control as applets, although it is possible, if desired, to declare that the policy on local code (or remote code) be the most liberal, thus enabling such code to effectively run as totally trusted. The same principle applies to signed applets and any Java application."
So if you want to do your applet (whether you store locally or remotely in the path of webserver) you would end up an easy way of changing policy file by allowing more easily to do the specific job.
Hope it gives a bit clear picture of it.

Similar Messages

  • One of the folders on my external hard drive has transformed into a unix executable file and I can no longer access my files. Is there any way to save the data?

    One of the folders on my external hard drive has transformed into a unix executable file and I can no longer access my files. Is there any way to save the data?

    Wow, have seen Files do that, but a whole Folder as I recall!
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu. (In Mac OS X 10.4 or later, you must select your language first.)
    Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair. Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)

  • HT1751 if I move my iTunes library to an external hard drive can my computer access these files in iTunes or do I need to move them back to play music, watch movies, etc.???

    If I move my iTunes library to an external hard drive, can my MacBookPro access these files in iTunes or do I need to move them backto my MacBookPro to play music, watch movies, etc.???
    Trying to alleviate some disc space on my Mac!!!

    Yes, it can. Launch iTunes with the Option key held down and navigate to that instance of the library.
    (86939)

  • Why can I not access internet files in mail. I get a "plug in failure" message.

    Why can I not access internet files in mail. I get a "plug in failure" message.

    ATTENTION MAC CUSTOMERS - Flash Player 13 "Plugin Failure" Workaround

  • If i create a partition for Windows 7, and boot up in Windows using Boot Camp, can I still access the files from the Mac partition (Photo's Music etc.)

    If i create a partition for Windows 7, and boot up in Windows using Boot Camp, can I still access the files from the Mac partition (Photo's Music etc.)

    JDFitch wrote:
    Ok Great,
    Will installing Boot Camp drivers allow me to both read and write to the OS X Volume from windows?
    This is important as if it will it means i can make the windows partition a lot smaller and keep all my files on the OS X partition which would be preferable.
    Jon
    No, OSX will be read only (from Windows) and vice versa. (you can install 3rd party utilities on either or both partitions, to make read/write possible)

  • Any ideas why I can no longer access shared files on networked PC's in my office? I keep getting a "server not exist or unavailable" error.

    I have been able to access the files in the past. Actually when I've had this problem before a restart has solved it. Not this time. And it keeps happening. Even more strange, Filemaker is able to access shared databases stored on the same PC's. Why can Filemaker see these computers? Both also show up in the finder but when I try to connect I get the error. I also tried "connect as" with no success. Any ideas?

    Thanks Barney, I am now using pages to open exisiting Word documents. and then saving in the new format. I then trash the old incompatable (.doc) file.
    This works OK, but it will be a time consuming operation to be repearted on each file that I use.
    Is there any shortcut to enable sync all of the .doc files to Page?
    I have not managed to recover Entourage email files . But now use Mail application, which is fine.
    Encountered problems are ongoing.
    I have an Epson Epson Stylus Photo Rx430 printer.
    Since upgrading to OSX10.7 print files do not load to the printer. The Epson job box shows data is being sent to printer but it the task is never completed.
    I take this to be a Printer  Driver issue.
    Today, I have been in contact  with Epson Printer support, enquiring if they have any driver updates for RX430 that would be compatable with OSX10.7 Lion.
    I was notified by Epson that they do not have any drivers for any of their printers for the new OSX 10.7.
    How may I  continue using my now unsupported Epson printer? 

  • HT6312 So if I have Mavericks, I can no longer access my files in iCloud?

    So if I have Mavericks, I can no longer access my Pages documents in iCloud? They are not accessible if I don't upgrade, and If I do upgrade they are also not accessible with Mavericks?

    Restore from the backup you made before wrecking the system. Never change the permissions of any file again.

  • Macbook pro can no longer access windows file share.  'This file server is available on your computer'

    Hi all,
    We have a consultant who uses a macbook pro to access the internet and a windows share within our network.  He has been accessing the internet and the windows share fine for over 4 weeks and overnight he can no longer access the internet or this windows share.  I have got the error down to a specific windows share which is actually a share on a DC hence the loss of internet.  When this user plugs in via ethernet he can view all network locations as expected and can access everyone succesfully bar this specific one.  Everytime he tries to access this share he gets the following error: 'This file server is available on your computer. Access the volumes and files locally'.  I have another macbook pro that can successfully access this share.
    I have tried renewing leases, browsing the network in finder, using 'cmd + k' all produce the same message.
    The user is running Mountain Lion
    Any ideas?
    Adam

    Find and delete the ~/Library/Preferences/com.apple.sidebarlists.plist file.  This is what keeps track of all your current server share mounts.  Maybe the file is corrupt or something.  Once you delete it, reboot the machine and then try again.  Don't empty the trash until you're sure everything works after the reboot.

  • Why can't I access any files on the other computers

    I am currently having trouble retrieving files from other local computers within my area that have Airport cards installed on them (as well as this computer I am currently using, which has the base). While it shows that I have a good connection between the computers on the network, I am unable to access any files from said computers externally, only the local servers show up. Is there any way to remedy this?

    Problems with buttons and links at the top of the page not working can be caused by an extension like the Yahoo! Toolbar or a Babylon extension that extents too much downwards and covers the top part of the browser window and thus makes links and buttons in that part of the screen not clickable.
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode

  • How can an applet access a file ??

    I have written an applet in Netbeans and it is working ok.. Now I need to embed this applet in an html file. I have used the following code for doing so :
    <Html>
    <Head>
    <Title>Java Example</Title>
    </Head>
    <Body>
    This is my page<br>
    Below you see an applet<br>
    <br>
    <Applet Code="MyApplet.class" width=200 Height=100>
    </Applet>
    </Body>
    </Html>Now when i run the html file.. the applet does not run. It gives an error called Applet notinited.
    Java console contains this :
    java.security.AccessControlException: access denied (java.io.FilePermission C:\postplotter.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkRead(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
         at java.io.FileReader.<init>(Unknown Source)
         at finalpkg.trial.init(trial.java:54)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)Please help. I think the problem is because the applet needs to access this file called C://postplotter.txt
    Edited by: sauvikc on Jul 25, 2008 7:33 AM

    I wrote the applet in Netbeans and its working fine when I run it.
    Now I need to run this applet on a different laptop, which does not have NetBeans. It has C://postplotter.txt with the necessary data.
    I am using FileReader to read the .txt file :
    try {                                           // Extracting parameters from the .txt file.
                String url = "C://postplotter.txt";
                FileReader input = new FileReader(url);
                BufferedReader bufread = new BufferedReader(input);
                String[] line  = new String[15];
                for (int i=0; i<15; i++) {
                    line[i] = bufread.readLine();
                    System.out.println(line);
    Please let me know how to go about doing this. (Opening the applet on the laptop).
    I would like to be able to write an html file which has the applet embedded in it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Is it possible to restrict user access to files that need read/write permissions?

    I am in the process of implementing electronic payments for a company's AP department.  Dynamics GP (Great Plains) needs to create an EFT file that will get sent to the bank.  After it is created, a script is run that sends the TXT file to the
    bank and then renames the file extension to SNT.  Users are logged on to the Great Plains server and have their own permission group.
    Because the file is sending payment instructions, it is essential that users cannot modify or create a file with fraudulent payment instructions to the bank (incorrect bank account info).
    With testing, I was able to save the file from GP to a folder where users cannot read it's contents, however the script cannot send the file to the bank without "read access" (it says not files available).
    Any ideas for solutions?  For instance, is it possible to make Great Plains and/or the script file "system" so that it can override the user profile's permissions? 
    I was also looking into the ability to hide the folder/files, but it appears users can choose to view hidden files and folders.

    I dont think so you can do it that way..

  • I can't open my pdf files with adobe reader  because I get a message that saysThere was a RAISE with

    i can't open my pdf files because i get a message that saysThere was a RAISE without a handler. The application will now exit.

    What is your operating system?  Reader version?

  • Can't open a pdf.file with Adobe Reader XI

    Adobe Reader  XI was installed successfully, however, I can not open my pdf.files.   A screen opens up asking for a word conversion, ms dos or other encoding,

    byyng wrote:
    Should I download the old Adobe Reader instead?
    No, you need to fix your file association; see http://windows.microsoft.com/en-in/windows-vista/change-which-programs-windows-uses-by-def ault

  • Why can I not open PDF files using adobe reader in firefox?

    When I try to read a PDF file with adobe reader the file looks like it starts to load, I see in the tool bar the page count but the file never opens.

    You can change the action for Portable Document Format (PDF) from Preview in Firefox to use another application like the Adobe Reader or set to Always Ask in "Firefox > Options/Preferences > Applications".
    You can set the pdfjs.disabled pref to true on the <b>about:config</b> page to disable the build-in PDF viewer.
    You can check the value of the plugin.disable_full_page_plugin_for_types pref on the about:config page and remove the application/pdf part if present or reset the pref to the default via the right-click context menu.
    See also:
    *https://support.mozilla.org/kb/view-pdf-files-firefox-without-downloading-them
    Note that your System Details List shows that you have a user.js file in the profile folder to initialize some prefs on each start of Firefox.
    *http://kb.mozillazine.org/Preferences_not_saved
    The user.js file is only present if you or other software has created it, so normally it wouldn't be there.
    You may want to check its content with a plain text editor if you didn't create this file yourself.
    The user.js file is read each time you start Firefox and initializes preferences to the value specified in this file, so involved preferences can only be changed temporarily for the current session.

  • I can't open my pdf files with adobe reader, adobe is not default

    I can't open my pdf file and when i select default program nothing happens, I try repair adobe reader, I try reinstall it, I installed older version, i try fix default programs but when I select my adobe reader nothing happens, there is still only windows media player (he is set as default). Please help me. I am already try all of those steps http://helpx.adobe.com/acrobat/kb/cant-open-pdf.html

    If Reader ISN'T in the list of prpgrams to open with, click "Browse"
    In the "Browse window" go to C/Program files [or Program Files (x86)]/Adobe/Reader 11/Reader
    Select "AcroRd32.exe" and click "Open"
    Make sure "Always use the selected program to open this kind of file" is checked and click "OK".

Maybe you are looking for

  • Flappy bird crashes on I phone 5

    Just noticed when I crash into the obstacles it will crash me out of the app ( this doesn't happen on my i pad air ? Any one else having this issue and is their a fix ?

  • Nano 6th g will not sync

    My ipod nano 6thg will not sync but will charge with my laptop

  • Iphone 4 error code 2001

    The battery on my iphone went dead. Now i get the cable and itunes logo when connected to the cable. Phone switches off when not connected. I connect to Itunes and it says i must restore. When i click restore i get an error code 2001. Did a google se

  • My Nef files Abobe camera raw

    My NEF files ( Nikon 800) is between 50-70 mb.  In ACR the workflow option states file size of 36,2 Mb  ( default)  Is there someting wrong in my set-up

  • Mail won't let me respond quoting the text of the original message

    Mail does not allow me to respond to an email quoting the original message. I tried going to preferences>composing and selecting "quote the text of the original message." under responding. But Mail doesn't allow me to select this option. I've also tr