Can't access image files

Wondering if anyone can help me .....
I am deploying an applet for an intranet, about 15 local users. The applet is a simple tree view which contains links to HTML files found in the same directory on the server as the applet. These links work fine and I am able to view these files from a client machine. My problem is with the image files that I am using for the icons in the TreeView. These .gif files are also within the same folder and work fine in AppletViewer. However the deployed versions throw a java.io.FilePermission Exception on both the server and client, and the images will not load.
I have read a stack of different articles and threads on this area and I understand the need for signing applets when they require access to local files, but it was my understanding that applets can always access files in the directory from which they were loaded? This seems to be true given that the html files load without error, so I am at a loss for why the .gif files will not also? I don't want to go to the expense of buying a Certificate for signing and the process for creating your own seems to make the deployment process extremely painful for the final user.
Any ideas? Thanks in advance
Chris

hi chris, i too had similar problem. you copy the java.policy file present in security subdirectory in jre directory to c:/windows in case if u r not logged in as an user or to the user profile directory if u r logged in as an user.if u see the java console in the plugin, u can find where to copy the file. rename the java.policy file to .java.policy file, and append the following code. this will work for all systems whether it is client or server. what u have to do is to append the .java.policy file the following code:
grant {
permission java.security.AllPermission;
this has to be done for all the client systems also.
if u r unable to access the gif files from the server, u simply put all the files in to the jar file that u sign and access the gif files using getClass().getResource(file path). the file path should be relative to the directory where u placed ur applet. this will work fine.
bye,padmanabhan.

Similar Messages

  • How can I assign image file name from Main() class

    I am trying to create library class which will be accessed and used by different applications (with different image files to be assigned). So, what image file to call should be determined by and in the Main class.
    Here is the Main class
    import org.me.lib.MyJNIWindowClass;
    public class Main {
    public Main() {
    public static void main(String[] args) {
    MyJNIWindowClass mw = new MyJNIWindowClass();
    mw.s = "clock.gif";
    And here is the library class
    package org.me.lib;
    public class MyJNIWindowClass {
    public String s;
    ImageIcon image = new ImageIcon("C:/Documents and Settings/Administrator/Desktop/" + s);
    public MyJNIWindowClass() {
    JLabel jl = new JLabel(image);
    JFrame jf = new JFrame();
    jf.add(jl);
    jf.setVisible(true);
    jf.pack();
    I do understand that when I am making reference from main() method to MyJNIWindowClass() s first initialized to null and that is why clock could not be seen but how can I assign image file name from Main() class for library class without creating reference to Main() from MyJNIWindowClass()? As I said, I want this library class being accessed from different applications (means different Main() classes).
    Thank you.

    Your problem is one of timing. Consider this simple example.
    public class Example {
        public String s;
        private String message = "Hello, " + s;
        public String toString() {
            return message;
        public static void main(String[] args) {
            Example ex = new Example();
            ex.s = "world";
            System.out.println(ex.toString());
    }When this code is executed, the following happens in order:
    1. new Example() is executed, causing an object to constructed. In particular:
    2. field s is given value null (since no value is explicitly assigned.
    3. field message is given value "Hello, null"
    4. Back in method main, field s is now given value "world", but that
    doesn't change message.
    5. Finally, "Hello, null" is output.
    The following fixes the above example:
    public class Example {
        private String message;
        public Example(String name) {
            message = "Hello, " + name;
        public String toString() {
            return message;
        public static void main(String[] args) {
            Example ex = new Example("world");
            System.out.println(ex.toString());
    }

  • How can I access images from IPhoto on my Mac to Photoshop CS6

    How can I access images from IPhoto library on my Mac to Photoshop CS6?  I enable jpg with format "Photoshop" and this is what comes up -  "Could not complete your request because Photoshop does not recognize this type of file" 

    MountainArtist wrote:
    …I enable jpg with format "Photoshop" and this is what comes up -  "Could not complete your request because Photoshop does not recognize this type of file" 
    Photoshop is not a format.  It's an application.
    What you are looking at are not true JPEGs, just iPhoto's "tease" representations of the hidden images it swallowed, as explained above.

  • Can't Access Old Files

    When I try to access files from Time Machine I get the message "This operation can't be completed because you don't have permission to access "item"." What causes this and how can I access these files?
    Thanks in advance

    So I did it exactly as I am explaining for you.. went back to beginning of the year and located the library.
    Created a new directory called recovered iphoto under the desktop.. and did a simple copy and paste to it.
    Then you change libraries in iphoto and you will be able to see all your photos.
    You will see from the location which library you are looking at.
    To change back go to the switch libraries and relaunch.
    I am sure this is only one method.. but by locating the file yourself you will be able to see if the file exists or not..
    I do always commend the method that pondini has worked out.
    http://pondini.org/TM/FAQ.html
    Q15 and then read the particulars for iphoto.
    http://pondini.org/TM/15p1.html
    But my instructions will get you around the problem of the TM not being able to see earlier dates.
    Please do read Pondini's info about how TM works..
    Although you may not follow it all the home page on the TM .. how it does its magic is required reading.
    http://pondini.org/TM/Home.html
    When the system goes through a major change.. And Mavericks is the worst culprit then it can really do some damage to your old backups.
    But you should also plug into the TC by ethernet.. and wait a while.. Mavericks version of TM can take ages to populate the TM display for dates earlier than Mavericks install (they don't register at all at first).
    Also note Pondini's comments about using Disk Images.. or clones.. as this is far more secure method to backup.. and know that your stuff is not going to be suddenly deleted by TM.

  • All my desktop icons are Adobe Reader icons, can't access related files

    I was trying to open a file this morning, and when a pop-menu asked what application I wanted to choose (from a list) to open it, I clicked on Adobe Reader - just as a guess.   After that,  just about all my desktop icons are Adobe icons, and when I click on them, the pop up menus says I can't access the file.   These icons also show up on my menu of all my MS Office programs like Outlook, Word, Excel,  etc. 
    Tech support at Adobe recommended I use System Restore, but it also is now an Adobe icon, so I can't open it.    If anyone can help reverse this, I'd greatly appreciate it.
    Thanks,
    David

    Hi,
    This also happened to me this morning. Now all my icons are PDF symbols and Reader opens when I try to open any other program. I uninstalled Reader it and it fixed itself but when I reinstalled the program the same issue occurred.
    I wanted to make PDF reader the default application when openning PDF's vs. Distiller, tinkered and broke my computer.
    Any clues on how to bring everything back to normaL?

  • How can I add image files to a executable jar file ?

    Could you tell me how can I add image files to executable jar file ?
    package structure:
    ../com/Main.class
    ../images/..

    Please don't cross post, and read this
    http://forum.java.sun.com/thread.jsp?forum=31&thread=271751
    I've answered the question in the New To Java thread.

  • Can I access my files stored in the hard disk connected to airport extreme when I am away? how?

    Can I access my files stored in the hard disk connected to airport extreme when i am away? How?

    You can't technically. iPads cannot directly read HDDs like a computer can. 
    You will need an app liie FileBrowser to do this. Of course all file operations will be done through the App itself.
    https://itunes.apple.com/us/app/filebrowser-access-files-on/id364738545?mt=8

  • I have an MS word doc saved from a Macbook in my flash drive. Now i want to print this from an IBM compatible laptop. problem is -- I can't access the file. Please help.

    I have an MS word doc saved from a Macbook Pro on m flash drive. Now i want to print
    th same doc from an IBM Compatible laptop. Problem is, I can't access the file. Please help.

    I suggest you post your question on Microsofts own forums for their Mac products as it's their software you're having issues with:
    http://answers.microsoft.com/en-us/mac

  • Can't access my files, the circle thing keeps going round and round

    I can't access my files, the little cursor thing keeps going round and round, is there a way to by pass that or is my powerbook going dead

    What version of OS X are you running?
    Useful article here on the causes of the Spinning Beach Ball and how to troubleshoot it:
    http://www.computerworld.com/s/article/9177479/Troubleshoot_the_spinning_beach_b all?taxonomyId=89&pageNumber=1
    and also this:
    http://www.thexlab.com/faqs/sbbod.html

  • How can we access the file/directory system in the server

    Hi friends,
    I have made a text editor attached with an audio player for my project.
    Both text editor and audio player are implemented in applet and put in to a
    jsp page using jsp:plugin. Text editor and player are separate applets running
    in the same page and from same server.A client who is using this editor may
    want to save the edited text files to the server as well as hear audio files from
    directories in the server.
    My question is how can we access the file/directory system in the server
    like we do in the local machine.When the user cliks save or openfromserver button
    in the editor, folder/files in the server must be displayed as we do with FileChooser.
    I am using Apache Tomcat 5,wiindows 2000 server, jdk1.5.
    manu

    You can't access it directly. But your applet can make net connections to the server, and the server can provide that kind of functionality. Generally this is easiest by making HTTP connections and having the server provide the functionality via the web server. (So in your case, JSPs or servlets on the server would list/deliver/create/modify/delete files, and the applets would invoke those JSPs and servlets.

  • Can i get the time capsule to automatically back up my file from my Mac Book Air but have certain files which are only stored on the time capsule and not the computer? Then can i access these files only on the time capsule without connecting it?

    Can i get the time capsule to automatically back up my file from my Mac Book Air but have certain files which are only stored on the time capsule and not the computer? Then can i access these files only on the time capsule without connecting it?

    igonneau wrote:
    Can i get the time capsule to automatically back up my file from my Mac Book Air but have certain files which are only stored on the time capsule and not the computer?
    You can, but how are you going to back up those other files?  When (not if) your Time Capsule fails, you risk losing them.  See #Q3 in Using Time Machine with a Time Capsule for details.
    Then can i access these files only on the time capsule without connecting it?
    Not sure what you mean.  You have to connect a computer, either via Ethernet cable or wirelessly, to read or write to the disk. 

  • How can I access video file from sd card on ipad2?

    How can I access video file from sd card on ipad2?

    Your iPad 2 will see the video if:
    It's in a DCIM folder on the top level of the card (which is how most cameras do it)
    It's name is 8 characters, no more, no less (CKDI9483 for example)
    It's a format that the iPad will play
    I've made mp4's of things, folderized them right and named them 'right' and can transfer them to my iPad, so you can use a computer to make the files conform to what the iPad will see.

  • Can I access local files?

    I am writing an application using Adobe Air that will have to utilize and store media files locally on a user's computer.  My marketing team now believes that a downloadable application that will be installed on a user's computer will be a dealbreaker for some users due to the fear of a virus, so now they are suggesting that we will have better sales numbers if people just need to log into a website to use the application.  No problem, Air applications can be embedded into a website.  But can an Air application embedded in a browser still store and manipulate files on a user's computer?  Storing media files for a large number of individuals can become cost prohibitive, so rather than store them online, we would like to create a folder on a user's system to organize their files.  Is this possible with a web-embedded Air application?
    Thanks.

    AIR applications are always installed on the user's computer. You cannot run an AIR application on a website. On a web page, you can include a link to download or install an AIR application.
    AIR applications can access local files.
    Flash Player applications can also access local files, but the user first grants permission. For example, see the FileReference.load() and FileReference.save() methods (added in Flash Player 10):
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference .html

  • InDesign CC, can't export to html, can't access unneeded file

    In the latest build of InDesign CC (July 2014), the export process to HTML has changed. You used to be able to export a book directly to filtered HTML files. Now the option is no longer in the Book menu, and you must go through the main menu, which does not allow filtered HTML option. I keep getting a crash when I open the resulting HTML file, "Can't access .jar file from SiteBuilder,"--a Yahoo HTML creation program, which I formerly used. The book file contains  only embedded jpg photo files and InDesign documents for chapters, but it calls for this unrelated and unconnected .jar file. Also, It is impossible to choose the "From Selection" option, only the "From Document" option, so I can't export the whole book into HTML, which previous versions enabled me to do.I'm stuck, and now Adobe has stopped offering phone support to subscribers. After wasting a whole day on this single issue, I'm fed up. Is it time to scrap InDesign?  Also, how do you edit an e-pub file created by InDesign? (It misplaces the photo captions)  Dreamwdeavce should be able to do it, but I can't figure out how. Any help would be appreciated. Peter

    Export the file from ID as an .idml file and open that resaving as an.indd file with a new name. That should strip out the reference to the unused file.

  • Apple TV2 can see my laptop but it can't access the files in on my laptop. Home sharing is turned on. I'm using Windows7 64bit. ATV2 can access the files on my other laptop and PC. I've updated my iTunes and ATV2. Any suggestions?

    Apple TV2 can see my laptop but it can't access the files on the laptop. ATV2 can access the files on my other laptop and PC.
    My PC can see the laptop in question but it can't access the files.
    I've updated iTunes to and ATV2 to the lastest version. My laptop is running Windows7 64bit.
    Any suggestions?

    Welcome to the Apple Community.
    I assume you taken the step of restarting the laptop.
    Have you checked your security software is allowing access for iTunes, which security software are you using.

Maybe you are looking for

  • How do I change my iCloud account on ios7 iphone 5?

    I shared my apple ID across family devices and now want to seperate them. I cannot get the iCloud account on my iPhone5 iOS 7 to change. I changed the messenger and face time ID, but the iCloud account is still grayed out so I cannot alter it.

  • Issue of Material on free /Fixed rate recovery basis to contractor

    Hi friends, I have one scenerios as follows: Purchasing dept. issues one contract to service provider with some conditions like some of the material willbe issued on free basis, some of the material willbe issued on fixed rate recovery basis. Is ther

  • How do I get the email to show folders off hotmail?

    I can't see the folders I have set up on my hotmail account, I can see them on my iPhone but not on my Mac Book Pro

  • 2008 24" iMac crashing both SnowLeopard and Mavericks

    My iMac crashes about 1-3 times a day, usually while scrolling (either via scroll wheel or using mouse), or switching tasks.  Sometimes the screen goes blank (either solid grey or white, or horizontal grey or white stripes, or all black), or the scre

  • Line items in script form

    hi, in my script form i was displaying line items for PO in main window. my problem is, the values of the line items are not displaying in the same line. example: item             material                 material description                qty. 01